@import url("../tokens.css");

html, body { height: 100%; background: var(--color-bg); }
body { -webkit-tap-highlight-color: transparent; }

.dash-shell {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* ---------- Top Header ---------- */
.dash-header {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-3);
  padding: calc(var(--space-3) + env(safe-area-inset-top)) var(--space-4) var(--space-3);
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}
.dash-header-left { display: flex; align-items: center; gap: var(--space-3); min-width: 0; }
.dash-logo { width: 32px; height: 32px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.dash-title { font-size: 17px; font-weight: 700; color: var(--color-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-header-right { display: flex; align-items: center; gap: var(--space-2); }

.icon-btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 999px; border: 0;
  background: var(--color-bg); color: var(--color-text);
  cursor: pointer; transition: background var(--transition), transform var(--transition);
}
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn:hover { background: var(--color-primary-soft); }
.icon-btn:active { transform: scale(.92); }
.icon-btn .badge {
  position: absolute; top: 6px; right: 6px;
  width: 8px; height: 8px; border-radius: 999px;
  background: var(--color-danger); border: 2px solid var(--color-surface);
}

/* ---------- Layout body (sidebar + main) ---------- */
.dash-body { flex: 1; display: flex; min-height: 0; }

.dash-sidebar { display: none; }

.dash-main {
  flex: 1; min-width: 0;
  padding: var(--space-4) var(--space-4) calc(96px + env(safe-area-inset-bottom));
  width: min(720px, 100%);
  margin-inline: auto;
}

/* ---------- Bottom Nav (mobile) ---------- */
.dash-bottomnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: var(--space-1) var(--space-2) calc(var(--space-1) + env(safe-area-inset-bottom));
}
.bn-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: var(--space-2) 0; border-radius: var(--radius-sm);
  color: var(--color-muted); text-decoration: none; font-size: 11px; font-weight: 600;
  transition: color var(--transition);
}
.bn-item svg { width: 22px; height: 22px; }
.bn-item.active { color: var(--color-primary); }

/* ---------- Greeting ---------- */
.dash-greeting { margin: var(--space-2) 0 var(--space-4); }
.dash-greeting h1 { font-size: 22px; margin: 0 0 4px; color: var(--color-text); }
.dash-greeting p { margin: 0; color: var(--color-muted); font-size: 14px; }

/* ---------- Stat tiles ---------- */
.stat-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-3);
  margin-bottom: var(--space-6);
}
.stat-tile {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-md); padding: var(--space-3);
  display: flex; flex-direction: column; gap: var(--space-2);
}
.stat-tile .stat-icon {
  width: 32px; height: 32px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: var(--color-primary-soft); color: var(--color-primary);
}
.stat-tile .stat-icon svg { width: 16px; height: 16px; }
.stat-tile .stat-value { font-size: 20px; font-weight: 700; color: var(--color-text); }
.stat-tile .stat-label { font-size: 12px; color: var(--color-muted); }

/* ---------- Section ---------- */
.dash-section { margin-bottom: var(--space-6); }
.dash-section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-3); }
.dash-section-head h2 { font-size: 15px; margin: 0; color: var(--color-text); }
.dash-section-head a { font-size: 13px; color: var(--color-primary); font-weight: 600; }

/* ---------- Generic card ---------- */
.ui-card {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-md); padding: var(--space-4);
  box-shadow: var(--shadow-sm);
}

/* ---------- Business CTA ---------- */
.cta-card {
  display: flex; align-items: center; gap: var(--space-3);
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  border-radius: var(--radius-md); padding: var(--space-4); color: #fff;
}
.cta-card .cta-icon { width: 40px; height: 40px; border-radius: 10px; background: rgba(255,255,255,.18); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.cta-card .cta-icon svg { width: 20px; height: 20px; }
.cta-card h3 { margin: 0 0 2px; font-size: 14px; }
.cta-card p { margin: 0; font-size: 12px; opacity: .9; }
.cta-badge { font-size: 10px; font-weight: 700; background: rgba(255,255,255,.22); padding: 2px 8px; border-radius: 999px; margin-left: auto; flex-shrink: 0; white-space: nowrap; }

/* ---------- Empty state ---------- */
.empty-state { text-align: center; padding: var(--space-8) var(--space-4); color: var(--color-muted); }
.empty-state .empty-icon {
  width: 56px; height: 56px; border-radius: 999px; margin: 0 auto var(--space-4);
  background: var(--color-primary-soft); color: var(--color-primary);
  display: flex; align-items: center; justify-content: center;
}
.empty-state .empty-icon svg { width: 26px; height: 26px; }
.empty-state h3 { color: var(--color-text); font-size: 15px; margin: 0 0 6px; }
.empty-state p { font-size: 13px; margin: 0 0 var(--space-4); }

/* ---------- Profile ---------- */
.profile-head { display: flex; flex-direction: column; align-items: center; text-align: center; padding: var(--space-4) 0 var(--space-6); }
.profile-avatar {
  width: 76px; height: 76px; border-radius: 999px;
  background: var(--color-primary-soft); color: var(--color-primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 700; margin-bottom: var(--space-3);
}
.profile-head h2 { margin: 0 0 2px; font-size: 18px; color: var(--color-text); }
.profile-head p { margin: 0; font-size: 13px; color: var(--color-muted); }

.field-row { margin-bottom: var(--space-4); }
.field-row label { display: block; font-size: 13px; font-weight: 600; color: var(--color-text); margin-bottom: 6px; }
.field-row input {
  width: 100%; min-height: 46px; padding: 0 var(--space-3);
  border: 1px solid var(--color-border); border-radius: var(--radius-sm);
  background: var(--color-bg); color: var(--color-text); font-size: 14px;
}
.field-row input:disabled { opacity: .65; }
.field-row input:focus { outline: none; border-color: var(--color-primary); }

.list-row {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-3) 0; border-bottom: 1px solid var(--color-border);
  background: none; border-left: 0; border-right: 0; border-top: 0;
  width: 100%; text-align: left; cursor: pointer; color: var(--color-text); font-size: 14px; font-weight: 600;
}
.list-row:last-child { border-bottom: 0; }
.list-row .list-icon { width: 34px; height: 34px; border-radius: 10px; background: var(--color-bg); color: var(--color-primary); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.list-row .list-icon svg { width: 17px; height: 17px; }
.list-row .list-chevron { margin-left: auto; color: var(--color-muted); }
.list-row.danger { color: var(--color-danger); }
.list-row.danger .list-icon { color: var(--color-danger); background: rgba(220,38,38,.1); }

.jsweb-btn {
  width: 100%; min-height: 48px; border: 0; border-radius: var(--radius-sm);
  background: var(--color-primary); color: #fff; font-weight: 700; font-size: 14px;
  cursor: pointer; transition: background var(--transition), transform var(--transition);
}
.jsweb-btn:hover { background: var(--color-primary-dark); }
.jsweb-btn:active { transform: scale(.98); }
.jsweb-btn.ghost { background: var(--color-bg); color: var(--color-text); border: 1px solid var(--color-border); }
.jsweb-btn:disabled { opacity: .6; cursor: not-allowed; }

.form-msg { font-size: 13px; margin: var(--space-2) 0 0; }
.form-msg.ok { color: var(--color-success); }
.form-msg.err { color: var(--color-danger); }

/* ---------- Responsive: tablet/desktop ---------- */
@media (min-width: 900px) {
  .dash-header { padding-left: var(--space-6); padding-right: var(--space-6); }
  .dash-bottomnav { display: none; }
  .dash-sidebar {
    display: flex; flex-direction: column; gap: var(--space-1);
    width: 220px; flex-shrink: 0; padding: var(--space-6) var(--space-3);
    border-right: 1px solid var(--color-border);
  }
  .dash-sidebar .bn-item {
    flex: none;
    flex-direction: row; justify-content: flex-start; gap: var(--space-3);
    font-size: 14px; padding: var(--space-3); border-radius: var(--radius-sm);
  }
  .dash-sidebar .bn-item.active { background: var(--color-primary-soft); }
  .dash-main { padding: var(--space-6); max-width: 640px; }
  .stat-grid { gap: var(--space-4); }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ---------- Toggle switch ---------- */
.toggle-row { display: flex; align-items: center; justify-content: space-between; padding: var(--space-2) 0; }
.toggle-row .toggle-label { display: flex; align-items: center; gap: var(--space-3); font-size: 14px; font-weight: 600; color: var(--color-text); }
.toggle-row .toggle-label .list-icon { width: 34px; height: 34px; border-radius: 10px; background: var(--color-bg); color: var(--color-primary); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.toggle-row .toggle-label .list-icon svg { width: 17px; height: 17px; }
.switch { position: relative; display: inline-block; width: 46px; height: 26px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch-slider { position: absolute; cursor: pointer; inset: 0; background: var(--color-border); border-radius: 999px; transition: background var(--transition); }
.switch-slider::before { content: ""; position: absolute; height: 20px; width: 20px; left: 3px; top: 3px; background: #fff; border-radius: 999px; transition: transform var(--transition); box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + .switch-slider { background: var(--color-primary); }
.switch input:checked + .switch-slider::before { transform: translateX(20px); }

.section-label { font-size: 12px; font-weight: 700; color: var(--color-muted); text-transform: uppercase; letter-spacing: .04em; margin: 0 0 var(--space-2) var(--space-1); }

/* ---------- Hamburger Drawer ---------- */
.drawer-overlay {
  position: fixed; inset: 0; background: rgba(15,23,42,.5);
  opacity: 0; pointer-events: none; transition: opacity var(--transition); z-index: 40;
}
.drawer-overlay.open { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed; top: 0; left: 0; bottom: 0; width: 280px; max-width: 82vw;
  background: var(--color-surface); z-index: 50; transform: translateX(-100%);
  transition: transform 220ms ease; display: flex; flex-direction: column;
  padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom);
  box-shadow: var(--shadow-md);
}
.drawer.open { transform: translateX(0); }

.drawer-head {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-4); border-bottom: 1px solid var(--color-border);
}
.drawer-logo { width: 32px; height: 32px; border-radius: 8px; object-fit: cover; }
.drawer-brand { font-weight: 700; font-size: 14px; color: var(--color-text); flex: 1; }

.drawer-nav { flex: 1; padding: var(--space-3); display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.drawer-link {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-3); border-radius: var(--radius-sm);
  color: var(--color-text); text-decoration: none; font-size: 14px; font-weight: 600;
  transition: background var(--transition);
}
.drawer-link svg { width: 19px; height: 19px; color: var(--color-muted); flex-shrink: 0; }
.drawer-link:hover { background: var(--color-bg); }
.drawer-link.active { background: var(--color-primary-soft); color: var(--color-primary); }
.drawer-link.active svg { color: var(--color-primary); }

.drawer-footer { padding: var(--space-3) var(--space-3) var(--space-4); border-top: 1px solid var(--color-border); }
.drawer-logout {
  width: 100%; display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-3); border: 0; border-radius: var(--radius-sm);
  background: none; color: var(--color-danger); font-size: 14px; font-weight: 700; cursor: pointer;
}
.drawer-logout:hover { background: rgba(220,38,38,.08); }
.drawer-logout svg { width: 19px; height: 19px; }

.placeholder-wrap { max-width: 480px; margin: 48px auto; padding: 0 var(--space-4); }

/* ---------- Typography upgrade ---------- */
.dash-title, .drawer-brand, .dash-section-head h2,
.empty-state h3, .profile-head h2, .cta-card h3 {
  font-family: var(--font-display);
}

.dash-greeting {
  display: flex; align-items: flex-start; gap: var(--space-3);
  margin: var(--space-2) 0 var(--space-4);
}
.dash-greeting .greeting-icon {
  width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
  background: var(--color-primary-soft); color: var(--color-primary);
  display: flex; align-items: center; justify-content: center;
}
.dash-greeting .greeting-icon svg { width: 20px; height: 20px; }
.dash-greeting h1 {
  font-family: var(--font-display); font-weight: 700;
  font-size: 24px; margin: 0 0 2px; color: var(--color-text);
}
.dash-greeting .name-script {
  font-family: var(--font-script); font-weight: 700;
  color: var(--color-primary); font-size: 1.2em;
}
.dash-greeting p { margin: 0; color: var(--color-muted); font-size: 14px; }

/* ---------- Profile upgrades ---------- */
.profile-avatar-wrap { position: relative; width: 76px; height: 76px; margin: 0 auto var(--space-3); }
.profile-avatar-wrap .profile-avatar { width: 100%; height: 100%; }
.profile-avatar-img { width: 100%; height: 100%; border-radius: 999px; object-fit: cover; display: none; }
.avatar-edit-btn {
  position: absolute; bottom: -2px; right: -2px; width: 28px; height: 28px; border-radius: 999px;
  background: var(--color-primary); color: #fff; display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--color-surface); cursor: pointer;
}
.avatar-edit-btn svg { width: 14px; height: 14px; }
.avatar-edit-btn input[type="file"] { display: none; }

.field-row textarea {
  width: 100%; min-height: 90px; padding: var(--space-3);
  border: 1px solid var(--color-border); border-radius: var(--radius-sm);
  background: var(--color-bg); color: var(--color-text); font-size: 14px;
  font-family: var(--font-sans); resize: vertical;
}
.field-row select {
  width: 100%; min-height: 46px; padding: 0 var(--space-3);
  border: 1px solid var(--color-border); border-radius: var(--radius-sm);
  background: var(--color-bg); color: var(--color-text); font-size: 14px;
}

.field-with-action { display: flex; gap: var(--space-2); align-items: stretch; }
.field-with-action input { flex: 1; }
.action-btn {
  flex-shrink: 0; width: 46px; height: 46px; border-radius: var(--radius-sm);
  border: 1px solid var(--color-border); background: var(--color-bg); color: var(--color-primary);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.action-btn svg { width: 18px; height: 18px; }

.readonly-row { display: flex; align-items: center; justify-content: space-between; padding: var(--space-2) 0; }
.readonly-row .ro-label { font-size: 13px; color: var(--color-muted); }
.readonly-row .ro-value { font-size: 14px; font-weight: 600; color: var(--color-text); }

.invite-card { display: flex; align-items: center; gap: var(--space-3); }
.invite-code {
  flex: 1; font-family: monospace; font-size: 15px; font-weight: 700; letter-spacing: 1.5px;
  color: var(--color-primary); background: var(--color-bg); border: 1px dashed var(--color-border);
  border-radius: var(--radius-sm); padding: var(--space-3); text-align: center;
}

/* ---------- Waving hand animation ---------- */
.greeting-icon { cursor: pointer; }
.greeting-icon svg { transform-origin: 70% 85%; }
.greeting-icon.waving svg {
  animation: wave-hand 1.6s ease-in-out;
}
@keyframes wave-hand {
  0%   { transform: rotate(0deg); }
  15%  { transform: rotate(18deg); }
  30%  { transform: rotate(-10deg); }
  45%  { transform: rotate(18deg); }
  60%  { transform: rotate(-6deg); }
  75%  { transform: rotate(12deg); }
  100% { transform: rotate(0deg); }
}

/* ---------- Wallet Card ---------- */
.wallet-card {
  position: relative; border-radius: 18px; padding: 16px 20px; color: #fff;
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 55%, #38bdf8 100%);
  box-shadow: var(--shadow-md); margin-bottom: 0;
  overflow: hidden; cursor: pointer;
  min-height: 260px;
  max-width: 440px; width: 100%; margin-left: auto; margin-right: auto;
  display: flex; flex-direction: column; justify-content: space-between;
  border: 1px solid rgba(255,255,255,.15);
}
.wallet-card::after {
  content: ""; position: absolute; top: -40px; right: -40px;
  width: 160px; height: 160px; border-radius: 50%; background: rgba(255,255,255,.08);
}
.wallet-card::before {
  content: ""; position: absolute; bottom: -60px; left: -30px;
  width: 180px; height: 180px; border-radius: 50%; background: rgba(255,255,255,.06);
}
.wallet-top { display: flex; align-items: center; justify-content: space-between; position: relative; z-index: 1; }
.wallet-top-text { display: flex; flex-direction: column; gap: 2px; }
.wallet-label { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; opacity: .9; }
.wallet-tagline { font-size: 9px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; opacity: .65; }
.wallet-logo { width: 30px; height: 30px; border-radius: 8px; object-fit: cover; background: rgba(255,255,255,.15); padding: 3px; }

.wallet-chip-row { display: flex; align-items: center; gap: 14px; margin: 8px 0; position: relative; z-index: 1; }
.wallet-chip {
  width: 38px; height: 28px; border-radius: 6px;
  background: linear-gradient(135deg, rgba(255,255,255,.85), rgba(255,255,255,.5));
}
.wallet-contactless { width: 20px; height: 20px; opacity: .8; }

.wallet-balance-row { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-3); position: relative; z-index: 1; margin-bottom: 10px; }
.wallet-sub-label { font-size: 11px; opacity: .85; display: flex; align-items: center; gap: 6px; margin-bottom: 4px; letter-spacing: .03em; text-transform: uppercase; }
.wallet-sub-badge { font-size: 9px; background: rgba(255,255,255,.22); padding: 2px 6px; border-radius: 999px; font-weight: 700; text-transform: none; letter-spacing: 0; }
.wallet-balance { font-size: 22px; font-weight: 700; font-family: var(--font-display); letter-spacing: .5px; }
.wallet-eye-btn {
  background: rgba(255,255,255,.18); border: 0; width: 34px; height: 34px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center; color: #fff; cursor: pointer; flex-shrink: 0;
}
.wallet-eye-btn svg { width: 16px; height: 16px; }

.wallet-number-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); position: relative; z-index: 1; margin-bottom: 10px; }
.wallet-number { font-family: monospace; font-size: 15px; letter-spacing: 2px; font-weight: 600; }

.wallet-bottom { display: flex; align-items: flex-end; justify-content: space-between; position: relative; z-index: 1; }
.wallet-bottom-left { display: flex; flex-direction: column; gap: 4px; }
.wallet-valid { font-size: 9px; letter-spacing: .05em; text-transform: uppercase; opacity: .7; font-family: monospace; }
.wallet-holder { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; opacity: .95; }
.wallet-badge { font-size: 10px; font-weight: 800; letter-spacing: .07em; background: rgba(255,255,255,.22); padding: 5px 10px; border-radius: 999px; white-space: nowrap; }

/* ---------- Waving hand: looping ---------- */
.greeting-icon.waving svg { animation: wave-hand 1.6s ease-in-out; }

/* ---------- Wallet card refinements ---------- */
.wallet-logo { width: 46px; height: 46px; padding: 5px; border-radius: 12px; }
#walletCard .wallet-logo { width: 58px; height: 58px; }
.points-logo { width: 54px !important; height: 54px !important; padding: 2px !important; background: transparent !important; }

/* ---------- Membership tier badge ---------- */
.plan-tier-badge { display: inline-flex; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; color: #fff; }
.plan-tier-badge.tier-regular { background: var(--color-muted); }
.plan-tier-badge.tier-member { background: #0d9488; }
.plan-tier-badge.tier-premium { background: #16a34a; }
.plan-tier-badge.tier-svip { background: #b8860b; }

.current-plan-banner {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-3);
  background: var(--color-primary-soft); border: 1px solid var(--color-border);
  border-radius: var(--radius-md); padding: var(--space-4); margin-bottom: var(--space-6);
}
.current-plan-banner .cpb-label { font-size: 13px; color: var(--color-muted); }

/* ---------- Plan cards ---------- */
.plan-grid { display: flex; flex-direction: column; gap: var(--space-4); }
.plan-card { position: relative; border-radius: var(--radius-lg); padding: var(--space-4); color: #fff; overflow: hidden; box-shadow: var(--shadow-md); }
.plan-card.tier-member { background: linear-gradient(135deg, #0d9488, #2dd4bf); }
.plan-card.tier-premium { background: linear-gradient(135deg, #15803d, #4ade80); }
.plan-card.tier-svip { background: linear-gradient(135deg, #92660b, #f0c14b); }
.plan-card-head { display: flex; align-items: center; gap: var(--space-2); margin-bottom: var(--space-2); }
.plan-crown { width: 26px; height: 26px; flex-shrink: 0; }
.plan-name { font-family: var(--font-display); font-size: 20px; font-weight: 700; }
.plan-price { font-size: 26px; font-weight: 800; margin: var(--space-2) 0 var(--space-4); }
.plan-price .plan-price-period { font-size: 12px; font-weight: 500; opacity: .85; }
.plan-feature-list { list-style: none; margin: 0 0 var(--space-4); padding: 0; display: flex; flex-direction: column; gap: 8px; }
.plan-feature { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; }
.plan-feature svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; }
.plan-select-btn {
  width: 100%; min-height: 44px; border: 0; border-radius: var(--radius-sm);
  background: rgba(255,255,255,.22); color: #fff; font-weight: 700; font-size: 14px; cursor: pointer;
  transition: background var(--transition);
}
.plan-select-btn:hover { background: rgba(255,255,255,.32); }

.upgrade-toast {
  position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%);
  background: var(--color-text); color: var(--color-surface);
  padding: 12px 18px; border-radius: 999px; font-size: 13px; font-weight: 600;
  box-shadow: var(--shadow-md); z-index: 60; opacity: 0; pointer-events: none;
  transition: opacity 200ms ease; text-align: center; max-width: 90vw;
}
.upgrade-toast.show { opacity: 1; }

@media (min-width: 900px) {
  .plan-grid { flex-direction: row; }
  .plan-card { flex: 1; }
}

/* ===== Upgrade Request Modal ===== */
.upgrade-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1000;
}

.upgrade-modal-overlay.open {
  display: flex;
}

.upgrade-modal {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 28px;
  width: 100%;
  max-width: 420px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border);
}

.upgrade-modal h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  margin: 0 0 4px;
  color: var(--color-text);
}

.upgrade-modal-amount {
  margin: 0 0 18px;
  color: var(--color-muted);
}

.upgrade-modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-muted);
  padding: 4px;
  display: flex;
  transition: color var(--transition);
}

.upgrade-modal-close:hover {
  color: var(--color-text);
}

.upgrade-modal-close svg {
  width: 20px;
  height: 20px;
}

.upgrade-payment-info {
  background: var(--color-primary-soft);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 18px;
}

.upgrade-payment-label {
  margin: 0 0 6px;
  font-size: 0.85rem;
  color: var(--color-muted);
}

.upgrade-payment-row {
  margin: 0 0 4px;
  font-size: 0.95rem;
  color: var(--color-text);
}

.upgrade-payment-note {
  margin: 8px 0 0;
  font-size: 0.8rem;
  color: var(--color-muted);
  font-style: italic;
}

.upgrade-field-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text);
  margin: 14px 0 6px;
}

#upgradeRequestForm select,
#upgradeRequestForm input[type="text"],
#upgradeRequestForm input[type="file"] {
  width: 100%;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  color: var(--color-text);
  font-size: 0.95rem;
  font-family: var(--font-sans);
  box-sizing: border-box;
}

#upgradeRequestForm select:focus,
#upgradeRequestForm input[type="text"]:focus {
  outline: none;
  border-color: var(--color-primary);
}

#upgradeRequestForm input[type="file"] {
  padding: 9px 12px;
}

.upgrade-form-error {
  color: var(--color-danger);
  font-size: 0.85rem;
  margin: 10px 0 0;
  min-height: 1.2em;
}

#upgradeRequestForm .plan-select-btn {
  width: 100%;
  margin-top: 16px;
}

#upgradeRequestForm .plan-select-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ===== Pending Upgrade Banner ===== */
.upgrade-pending-banner {
  display: none;
  align-items: flex-start;
  gap: 14px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-top: 20px;
  box-shadow: var(--shadow-sm);
}

.upgrade-pending-banner svg {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  color: var(--color-warning);
  margin-top: 2px;
}

.upgrade-pending-title {
  margin: 0 0 4px;
  font-weight: 600;
  color: var(--color-text);
}

.upgrade-pending-sub {
  margin: 0;
  font-size: 0.88rem;
  color: var(--color-muted);
}

/* ===== Upgrade Modal Loading State ===== */
.upgrade-modal-loading {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 32px 0;
  text-align: center;
}

.upgrade-modal-loading.show {
  display: flex;
}

.upgrade-modal-loading p {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.92rem;
}

.upgrade-spinner {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-primary);
  animation: upgrade-spin 0.8s linear infinite;
}

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

.cpb-expiry {
  display: block;
  margin-top: 4px;
  font-size: 0.78rem;
  color: var(--color-muted);
}

.drawer-soon-badge {
  margin-left: auto;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--color-primary-soft);
  color: var(--color-primary);
  flex-shrink: 0;
}

.notif-wrap { position: relative; }
.notif-dot {
  position: absolute; top: 6px; right: 6px; width: 8px; height: 8px;
  border-radius: 50%; background: var(--color-danger); border: 2px solid var(--color-surface);
}
.notif-panel {
  position: absolute; top: calc(100% + 10px); right: 0; width: 320px;
  max-width: calc(100vw - 32px); max-height: 420px;
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-md); box-shadow: var(--shadow-md);
  display: none; flex-direction: column; z-index: 300; overflow: hidden;
}
.notif-panel.open { display: flex; }
.notif-panel-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; border-bottom: 1px solid var(--color-border);
  font-weight: 600; color: var(--color-text); font-size: 0.92rem;
}
.notif-panel-head button {
  background: none; border: none; color: var(--color-primary);
  font-size: 0.78rem; font-weight: 600; cursor: pointer; padding: 0;
}
.notif-list { overflow-y: auto; flex: 1; }
.notif-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 14px; border-bottom: 1px solid var(--color-border);
}
.notif-item.unread { background: var(--color-primary-soft); }
.notif-item-body { flex: 1; min-width: 0; }
.notif-item-title { margin: 0 0 2px; font-size: 0.86rem; font-weight: 600; color: var(--color-text); }
.notif-item-message { margin: 0 0 4px; font-size: 0.82rem; color: var(--color-muted); line-height: 1.4; }
.notif-item-time { margin: 0; font-size: 0.72rem; color: var(--color-muted); opacity: 0.8; }
.notif-item-delete { background: none; border: none; color: var(--color-muted); cursor: pointer; padding: 2px; flex-shrink: 0; }
.notif-item-delete:hover { color: var(--color-danger); }
.notif-item-delete svg { width: 16px; height: 16px; }
.notif-empty { padding: 24px; text-align: center; color: var(--color-muted); font-size: 0.85rem; display: none; }

/* === Tree / Genealogy === */
.tree-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: var(--space-3, 12px);
  margin-bottom: 16px;
}
.tree-summary-card {
  text-align: center;
  padding: var(--space-4);
}
.tree-summary-value {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary);
}
.tree-summary-label {
  font-size: 0.76rem;
  color: var(--color-muted);
  margin-top: 2px;
}

.tree-invite-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
}
.tree-invite-card .section-label {
  color: rgba(255,255,255,.82) !important;
}
.tree-invite-code {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 1.5px;
  font-size: 1.1rem;
  color: #fff;
}
.tree-invite-card .action-btn {
  background: rgba(255,255,255,.18);
  color: #fff;
  border: none;
}

.tree-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  padding: 12px var(--space-4);
}
.tree-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--color-muted);
}
.tree-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.tree-legend-dot.tier-regular { background: var(--color-border); }
.tree-legend-dot.tier-member { background: #2f9e44; }
.tree-legend-dot.tier-premium { background: #ae8a2a; }
.tree-legend-dot.tier-svip { background: #9c36b5; }
.tree-legend-badge {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.tree-legend-badge.direct { background: rgba(16,185,129,.15); color: #0d9668; }
.tree-legend-badge.placed { background: rgba(245,158,11,.15); color: #b45309; }

.tree-scroll {
  overflow-x: auto;
  padding: 32px 16px 36px;
}

.org-tree, .org-tree ul, .org-tree li {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}
.org-tree {
  text-align: center;
  white-space: nowrap;
}
.org-tree li {
  display: inline-block;
  vertical-align: top;
  padding: 28px 14px 0 14px;
  position: relative;
}
.org-tree li::before,
.org-tree li::after {
  content: "";
  position: absolute;
  top: 0;
  right: 50%;
  border-top: 2px solid var(--color-primary-soft);
  width: 50%;
  height: 28px;
}
.org-tree li::after {
  right: auto;
  left: 50%;
  border-left: 2px solid var(--color-primary-soft);
}
.org-tree li:only-child::after,
.org-tree li:only-child::before {
  display: none;
}
.org-tree li:only-child {
  padding-top: 0;
}
.org-tree li:first-child::before,
.org-tree li:last-child::after {
  border: 0 none;
}
.org-tree li:last-child::before {
  border-right: 2px solid var(--color-primary-soft);
  border-radius: 0 8px 0 0;
}
.org-tree li:first-child::after {
  border-radius: 8px 0 0 0;
}
.org-tree ul {
  margin-top: 0;
  position: relative;
  padding-top: 28px;
}
.org-tree ul::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  border-left: 2px solid var(--color-primary-soft);
  width: 0;
  height: 28px;
}
.org-tree .tree-node {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  white-space: normal;
  width: 94px;
  transition: transform 0.15s ease;
}
.org-tree .tree-node:hover {
  transform: translateY(-2px);
}
.tree-node-circle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--color-primary-soft);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.05rem;
  border: 3px solid var(--color-primary);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.tree-node-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.tree-node-circle.is-root {
  width: 72px;
  height: 72px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: #fff;
  border-color: var(--color-primary-dark);
  font-size: 1.2rem;
  box-shadow: var(--shadow-md);
}
.tree-node-circle.tier-regular { border-color: var(--color-border); }
.tree-node-circle.tier-member { border-color: #2f9e44; }
.tree-node-circle.tier-premium { border-color: #ae8a2a; }
.tree-node-circle.tier-svip { border-color: #9c36b5; }
.tree-node-name {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--color-text);
  text-align: center;
  line-height: 1.2;
  max-width: 94px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tree-node-tier {
  font-size: 0.62rem;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: .03em;
}
.tree-node-badge {
  font-size: 8px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.tree-node-badge.direct { background: rgba(16,185,129,.15); color: #0d9668; }
.tree-node-badge.placed { background: rgba(245,158,11,.15); color: #b45309; }

.tree-empty-slot {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 2px dashed var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-muted);
  font-size: 1.3rem;
}

/* === Wallet === */
.wallet-summary-card {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: var(--space-6);
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  border: none;
  box-shadow: 0 14px 32px rgba(79, 70, 229, .28);
}
.wallet-summary-card::before {
  content: "";
  position: absolute;
  top: -60%;
  left: -25%;
  width: 60%;
  height: 220%;
  background: rgba(255, 255, 255, .14);
  transform: rotate(20deg) translateX(0);
  pointer-events: none;
  animation: walletShine 6s ease-in-out infinite;
}
@keyframes walletShine {
  0%, 100% { transform: rotate(20deg) translateX(0); opacity: .55; }
  50% { transform: rotate(20deg) translateX(320%); opacity: .12; }
}
@media (prefers-reduced-motion: reduce) {
  .wallet-summary-card::before { animation: none; }
}
.wallet-summary-label {
  position: relative;
  z-index: 1;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, .85);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.wallet-summary-value {
  position: relative;
  z-index: 1;
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 800;
  color: #fff;
  margin-top: 6px;
  letter-spacing: -0.01em;
}

.wallet-breakdown-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  margin-bottom: 20px;
}
.wallet-breakdown-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
  transition: transform var(--transition), box-shadow var(--transition);
}
.wallet-breakdown-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.wallet-breakdown-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2px;
}
.wallet-breakdown-icon svg { width: 18px; height: 18px; }
.wbi-referral { background: var(--color-primary-soft); color: var(--color-primary); }
.wbi-matching { background: rgba(6, 182, 212, .14); color: var(--color-accent); }
.wbi-topup { background: rgba(22, 163, 74, .12); color: var(--color-success); }
.wbi-withdraw { background: rgba(245, 158, 11, .14); color: var(--color-warning); }
.wbi-income { background: rgba(22, 163, 74, .12); color: var(--color-success); }
.wallet-breakdown-value {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-text);
}
.wallet-breakdown-label {
  font-size: 0.74rem;
  color: var(--color-muted);
  margin-top: 2px;
}
.wallet-breakdown-card-wide {
  grid-column: 1 / -1;
  flex-direction: row;
  justify-content: flex-start;
  text-align: left;
  gap: var(--space-3);
}
.wallet-breakdown-card-wide .wallet-breakdown-icon {
  width: 44px;
  height: 44px;
  margin-bottom: 0;
  flex-shrink: 0;
}
.wallet-breakdown-card-wide .wallet-breakdown-icon svg { width: 22px; height: 22px; }
.wallet-breakdown-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.wallet-tx-list {
  display: flex;
  flex-direction: column;
}
.wallet-tx-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--color-border);
}
.wallet-tx-item:last-child {
  border-bottom: 0;
}
.wallet-tx-icon {
  width: 42px;
  height: 42px;
  min-width: 42px;
  border-radius: 50%;
  background: var(--color-primary-soft);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}
.wallet-tx-icon svg { width: 20px; height: 20px; }
.wallet-tx-main { flex: 1; min-width: 0; }
.wallet-tx-type {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--color-text);
}
.wallet-tx-desc {
  font-size: 0.78rem;
  color: var(--color-muted);
  margin-top: 1px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wallet-tx-date {
  font-size: 0.72rem;
  color: var(--color-muted);
  margin-top: 2px;
}
.wallet-tx-amount {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--color-success);
  white-space: nowrap;
}

.wallet-tx-icon.tint-primary { background: var(--color-primary-soft); color: var(--color-primary); }
.wallet-tx-icon.tint-success { background: rgba(22, 163, 74, .12); color: var(--color-success); }
.wallet-tx-icon.tint-danger { background: rgba(220, 38, 38, .12); color: var(--color-danger); }
.wallet-tx-icon.tint-accent { background: rgba(6, 182, 212, .14); color: var(--color-accent); }
.wallet-tx-icon.tint-muted { background: var(--color-border); color: var(--color-muted); }

.wallet-tx-date-header {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: 14px 0 6px;
}
.wallet-tx-date-header:first-child { padding-top: 2px; }

.wallet-tx-item { transition: background var(--transition); border-radius: var(--radius-sm); }
.wallet-tx-item:hover { background: var(--color-bg); }

/* === Current Plan Banner layout fix === */
.current-plan-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}
.cpb-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}
.current-plan-banner .cpb-expiry {
  display: block;
  font-size: 0.72rem;
  color: var(--color-muted);
}

/* === Profile: Edit mode, Completeness, Connect accounts === */
.profile-head {
  position: relative;
}
.edit-profile-btn {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-primary);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background var(--transition);
}
.edit-profile-btn:hover { background: var(--color-primary-soft); }
.edit-profile-btn.is-editing {
  color: var(--color-danger);
  border-color: var(--color-danger);
}
.edit-profile-btn svg { width: 16px; height: 16px; }

.profile-completeness-card {
  margin-bottom: 20px;
}
.pc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.pc-head span:first-child {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--color-text);
}
.pc-percent {
  font-weight: 700;
  color: var(--color-primary);
  font-size: 0.88rem;
}
.pc-bar-track {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: var(--color-border);
  overflow: hidden;
}
.pc-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  transition: width 300ms ease;
}
.pc-hint {
  font-size: 0.74rem;
  color: var(--color-muted);
  margin-top: 6px;
}

.connect-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border);
}
.connect-row:last-child { border-bottom: 0; }
.connect-icon {
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.connect-icon svg { width: 18px; height: 18px; }
.connect-icon.fb { background: #1877F2; }
.connect-icon.tiktok { background: #000000; }
.connect-icon.discord { background: #5865F2; }
.connect-icon.twitter { background: #000000; }
.connect-name {
  flex: 1;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-text);
}

/* === Dashboard Quick Actions === */
.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}
.quick-action-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  position: relative;
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
}
.qa-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.qa-icon svg { width: 22px; height: 22px; }
.qa-send { background: linear-gradient(135deg, var(--color-primary), var(--color-accent)); }
.qa-topup { background: linear-gradient(135deg, #16A34A, #22C55E); }
.qa-withdraw { background: linear-gradient(135deg, #F59E0B, #FBBF24); }
.qa-task { background: linear-gradient(135deg, #9333EA, #C084FC); }
.qa-activity { background: linear-gradient(135deg, #DC2626, #F87171); }
.qa-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--color-text);
  text-align: center;
}
.quick-action-item.is-soon { opacity: .55; }
.qa-soon-badge {
  position: absolute;
  top: -4px;
  right: 2px;
  font-size: 0.56rem;
  font-weight: 700;
  color: #fff;
  background: var(--color-warning);
  padding: 1px 5px;
  border-radius: 999px;
}

/* === Wallet transaction debit/credit coloring === */
.wallet-tx-amount.debit { color: var(--color-danger); }
.wallet-tx-amount.credit { color: var(--color-success); }

/* === Send Money page === */
.send-upsell-card {
  text-align: center;
  padding: var(--space-8) var(--space-4);
}
.send-upsell-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-primary-soft);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
}
.send-upsell-icon svg { width: 28px; height: 28px; }
.send-fee-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 0.85rem;
  color: var(--color-muted);
}
.send-fee-row.total {
  border-top: 1px solid var(--color-border);
  margin-top: 6px;
  padding-top: 10px;
  font-weight: 700;
  color: var(--color-text);
  font-size: 0.95rem;
}
.send-recipient-preview {
  font-size: 0.8rem;
  margin-top: 4px;
  min-height: 18px;
}
.send-recipient-preview.ok { color: var(--color-success); }
.send-recipient-preview.err { color: var(--color-danger); }

/* === Plan Grid: Regular/Free tier card === */
.plan-card.tier-regular {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text);
}
.plan-card.tier-regular .plan-price .plan-price-period { color: var(--color-muted); }
.plan-card.tier-regular .plan-crown { color: var(--color-muted); }
.plan-card.tier-regular .plan-feature svg { color: var(--color-muted); }
.plan-card.tier-regular .plan-select-btn {
  background: var(--color-bg);
  color: var(--color-muted);
  border: 1px solid var(--color-border);
}
.plan-card.tier-regular .plan-select-btn:hover { background: var(--color-bg); }
.plan-select-btn:disabled {
  opacity: .55;
  cursor: not-allowed;
}

/* === Featured Perks info button + modal === */
.perks-info-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-left: 4px;
  padding: 0;
  border: none;
  background: rgba(255,255,255,.25);
  color: inherit;
  border-radius: 50%;
  cursor: pointer;
  vertical-align: middle;
}
.perks-info-btn svg { width: 12px; height: 12px; }
.plan-card.tier-regular .perks-info-btn { display: none; }

.perks-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,.5);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}
.perks-modal-overlay.is-open { opacity: 1; pointer-events: auto; }
.perks-modal {
  background: var(--color-surface);
  color: var(--color-text);
  width: 100%;
  max-width: 480px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: var(--space-4);
  max-height: 80vh;
  overflow-y: auto;
  transform: translateY(16px);
  transition: transform 180ms ease;
}
.perks-modal-overlay.is-open .perks-modal { transform: translateY(0); }
@media (min-width: 640px) {
  .perks-modal-overlay { align-items: center; }
  .perks-modal { border-radius: var(--radius-lg); }
}
.perks-modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.perks-modal-head h3 { margin: 0; font-family: var(--font-display); }
.perks-modal-sub { color: var(--color-muted); font-size: 13px; margin: 0 0 var(--space-3); }
.perks-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.perk-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}
.perk-icon { width: 24px; height: 24px; flex-shrink: 0; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.perk-icon svg { width: 14px; height: 14px; }
.perk-item.unlocked { background: rgba(22,163,74,.08); }
.perk-item.unlocked .perk-icon { background: var(--color-success); color: #fff; }
.perk-item.locked { opacity: .6; }
.perk-item.locked .perk-icon { background: var(--color-border); color: var(--color-muted); }
.perk-label { flex: 1; font-size: 14px; font-weight: 600; }
.perk-tier-tag { font-size: 11px; font-weight: 700; color: var(--color-muted); text-transform: uppercase; }

/* === Featured Perks trigger (whole phrase is tappable) === */
.perks-trigger {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  padding: 2px 0;
  margin: 0;
  color: inherit;
  font: inherit;
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  position: relative;
  z-index: 2;
}
.perks-trigger svg { width: 12px; height: 12px; flex-shrink: 0; }
.plan-card.tier-regular .perks-trigger { display: none; }

/* === Accent Color presets === */
:root[data-accent="teal"] {
  --color-primary: #0d9488;
  --color-primary-dark: #0f766e;
  --color-primary-soft: rgba(13,148,136,.12);
}
:root[data-accent="rose"] {
  --color-primary: #e11d48;
  --color-primary-dark: #be123c;
  --color-primary-soft: rgba(225,29,72,.12);
}
:root[data-accent="amber"] {
  --color-primary: #d97706;
  --color-primary-dark: #b45309;
  --color-primary-soft: rgba(217,119,6,.12);
}
:root[data-accent="violet"] {
  --color-primary: #7c3aed;
  --color-primary-dark: #6d28d9;
  --color-primary-soft: rgba(124,58,237,.12);
}

/* === Font Size scaling (applied to main content area) === */
[data-font-size="small"] .dash-main { zoom: 0.92; }
[data-font-size="large"] .dash-main { zoom: 1.12; }

/* === Appearance settings UI === */
.accent-swatch-row { display: flex; gap: 12px; padding: 10px 0 2px; flex-wrap: wrap; }
.accent-swatch {
  width: 36px; height: 36px; border-radius: 50%; border: 2px solid transparent;
  cursor: pointer; position: relative; flex-shrink: 0; padding: 0;
}
.accent-swatch.is-selected { border-color: var(--color-text); }
.accent-swatch.is-selected::after {
  content: ""; position: absolute; inset: 0; margin: auto; width: 10px; height: 10px;
  border-radius: 50%; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.2);
}

.segmented-control { display: flex; background: var(--color-bg); border-radius: var(--radius-sm); padding: 3px; gap: 3px; }
.segmented-option {
  flex: 1; text-align: center; padding: 8px 10px; border-radius: calc(var(--radius-sm) - 2px);
  font-size: 13px; font-weight: 600; cursor: pointer; border: none; background: none; color: var(--color-muted);
}
.segmented-option.is-active { background: var(--color-surface); color: var(--color-text); box-shadow: var(--shadow-sm); }

.perk-locked-overlay {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px; margin-top: 10px;
  background: var(--color-primary-soft); border-radius: var(--radius-sm); font-size: 12px; color: var(--color-primary);
}
.perk-locked-overlay a { color: inherit; font-weight: 700; text-decoration: underline; }

/* === Services page: static preview rows === */
.service-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 4px;
  border-bottom: 1px solid var(--color-border);
  cursor: default;
}
.service-row:last-child { border-bottom: none; }
.service-row .list-icon {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--color-bg); color: var(--color-muted);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.service-row .list-icon svg { width: 18px; height: 18px; }
.service-row-label { flex: 1; font-size: 14px; font-weight: 600; color: var(--color-text); }
.service-row-crown { color: var(--color-warning); flex-shrink: 0; display: flex; }
.service-row-crown svg { width: 18px; height: 18px; }

/* === Transactions page: filter bar === */
.tx-filter-card { padding: var(--space-4); }
.tx-filter-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.tx-filter-row + .tx-filter-row { margin-top: 12px; }
.tx-filter-row .field-row { flex: 1; min-width: 130px; margin-bottom: 0; }
.tx-filter-row select {
  flex: 1; min-width: 150px; height: 42px; border-radius: var(--radius-sm);
  border: 1px solid var(--color-border); background: var(--color-surface);
  color: var(--color-text); padding: 0 10px; font-size: 13px;
}

/* === Reports page: account report === */
.rpt-period-card { padding: var(--space-3) var(--space-4); margin-bottom: 20px; }
.rpt-stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 20px; }
.rpt-stat-card { display: flex; flex-direction: column; gap: 6px; padding: var(--space-4); }
.rpt-stat-label { font-size: 12px; color: var(--color-muted); text-transform: uppercase; letter-spacing: .03em; }
.rpt-stat-value { font-size: 20px; font-weight: 700; color: var(--color-text); }
.rpt-chart-card, .rpt-breakdown-card, .rpt-account-card { margin-bottom: 20px; padding: var(--space-4); }
.rpt-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.rpt-card-head h3 { margin: 0; font-size: 15px; }
.rpt-card-sub { font-size: 12px; color: var(--color-muted); }
.rpt-chart-wrap { width: 100%; height: 120px; }
.rpt-chart-wrap svg { width: 100%; height: 100%; display: block; }
.rpt-chart-labels { display: flex; justify-content: space-between; margin-top: 6px; font-size: 11px; color: var(--color-muted); }
.rpt-bar { display: flex; width: 100%; height: 14px; border-radius: 999px; overflow: hidden; background: var(--color-bg); margin-bottom: 12px; }
.rpt-bar-seg { height: 100%; }
.rpt-legend { display: flex; flex-direction: column; gap: 8px; }
.rpt-legend-item { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--color-text); }
.rpt-legend-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.rpt-legend-pct { margin-left: auto; color: var(--color-muted); font-size: 12px; }
.rpt-account-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--color-border); }
.rpt-account-row:last-child { border-bottom: none; }
.rpt-account-label { font-size: 13px; color: var(--color-muted); }
.rpt-account-value { font-size: 14px; font-weight: 600; color: var(--color-text); }
.rpt-empty { text-align: center; font-size: 13px; color: var(--color-muted); padding: 20px 0; }

@media (min-width: 640px) {
  .rpt-stat-grid { grid-template-columns: repeat(4, 1fr); }
}

/* === About Us page === */
.abt-hero { text-align: center; padding: var(--space-5) var(--space-4); margin-top: 20px; margin-bottom: 20px; }
.abt-hero-icon { width: 88px; height: 88px; margin: -46px auto 14px; border-radius: 50%; overflow: hidden; background: var(--color-surface); box-shadow: var(--shadow-md); border: 3px solid var(--color-surface); position: relative; z-index: 2; }
.abt-hero-icon img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }

.abt-vision-banner { position: relative; padding: 0; overflow: hidden; margin-bottom: 20px; }
.abt-vision-banner img { width: 100%; height: 220px; object-fit: cover; display: block; }
.abt-vision-overlay { position: absolute; left: 0; right: 0; bottom: 0; padding: var(--space-4); background: linear-gradient(to top, rgba(0,0,0,.8), rgba(0,0,0,0)); }
.abt-vision-overlay h3 { margin: 0 0 4px; font-size: 15px; color: #fff; }
.abt-vision-overlay p { margin: 0; font-size: 12px; color: rgba(255,255,255,.88); line-height: 1.5; }
.abt-hero h2 { margin: 0 0 8px; font-size: 20px; color: var(--color-text); }
.abt-hero p { margin: 0; font-size: 14px; color: var(--color-muted); line-height: 1.6; max-width: 520px; margin-left: auto; margin-right: auto; }

.abt-mv-grid { display: grid; grid-template-columns: 1fr; gap: 14px; margin-bottom: 20px; }
.abt-mv-card { padding: var(--space-4); }
.abt-mv-card h3 { margin: 0 0 8px; font-size: 15px; color: var(--color-text); display: flex; align-items: center; gap: 8px; }
.abt-mv-card h3 svg { width: 18px; height: 18px; color: var(--color-primary); flex-shrink: 0; }
.abt-mv-card p { margin: 0; font-size: 13px; color: var(--color-muted); line-height: 1.6; }

.abt-section-title { font-size: 16px; color: var(--color-text); margin: 0 0 14px; }

.abt-offer-grid { display: grid; grid-template-columns: 1fr; gap: 12px; margin-bottom: 20px; }
.abt-offer-card { padding: var(--space-4); display: flex; gap: 12px; align-items: flex-start; }
.abt-offer-icon { width: 38px; height: 38px; flex-shrink: 0; border-radius: var(--radius-md); background: var(--color-primary-soft); color: var(--color-primary); display: flex; align-items: center; justify-content: center; }
.abt-offer-icon svg { width: 20px; height: 20px; }
.abt-offer-text h4 { margin: 0 0 4px; font-size: 14px; color: var(--color-text); }
.abt-offer-text p { margin: 0; font-size: 13px; color: var(--color-muted); line-height: 1.5; }

.abt-stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 20px; }
.abt-stat-card { padding: var(--space-4); text-align: center; }
.abt-stat-value { display: block; font-size: 20px; font-weight: 700; color: var(--color-primary); margin-bottom: 4px; }
.abt-stat-label { font-size: 11px; color: var(--color-muted); text-transform: uppercase; letter-spacing: .03em; }

.abt-cta-card { position: relative; padding: var(--space-6) var(--space-4); text-align: center; background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark)); color: #fff; margin-bottom: 20px; overflow: hidden; }
.abt-cta-card::before { content: ""; position: absolute; top: -60px; right: -50px; width: 160px; height: 160px; border-radius: 50%; background: rgba(255,255,255,.08); }
.abt-cta-card::after { content: ""; position: absolute; bottom: -80px; left: -50px; width: 180px; height: 180px; border-radius: 50%; background: rgba(255,255,255,.06); }
.abt-cta-icon { position: relative; z-index: 1; width: 52px; height: 52px; margin: 0 auto 14px; border-radius: 50%; background: rgba(255,255,255,.15); display: flex; align-items: center; justify-content: center; }
.abt-cta-icon svg { width: 26px; height: 26px; color: #fff; }
.abt-cta-card h3 { position: relative; z-index: 1; margin: 0 0 8px; font-size: 19px; font-weight: 700; color: #fff; }
.abt-cta-card p { position: relative; z-index: 1; margin: 0 0 20px; font-size: 13px; color: rgba(255,255,255,.88); max-width: 300px; margin-left: auto; margin-right: auto; line-height: 1.5; }
.abt-cta-btn { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 8px; background: #fff; color: var(--color-primary-dark); font-weight: 700; font-size: 14px; padding: 12px 26px; border-radius: 999px; text-decoration: none; box-shadow: 0 8px 20px rgba(0,0,0,.18); }
.abt-cta-btn svg { width: 16px; height: 16px; }

@media (min-width: 640px) {
  .abt-mv-grid { grid-template-columns: 1fr 1fr; }
  .abt-offer-grid { grid-template-columns: 1fr 1fr; }
}

/* === About Us page: images === */
.abt-hero { padding: 0 0 var(--space-5); overflow: hidden; }
.abt-hero-banner { width: 100%; height: 180px; overflow: hidden; }
.abt-hero-banner img { width: 100%; height: 100%; object-fit: cover; display: block; }
.abt-hero-body { padding: var(--space-5) var(--space-4) 0; }

.abt-partner-card { padding: 0; overflow: hidden; margin-bottom: 20px; }
.abt-partner-img { width: 100%; height: 170px; overflow: hidden; }
.abt-partner-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.abt-partner-body { padding: var(--space-4); }
.abt-partner-body h3 { margin: 0 0 8px; font-size: 15px; color: var(--color-text); }
.abt-partner-body p { margin: 0; font-size: 13px; color: var(--color-muted); line-height: 1.6; }

@media (min-width: 640px) {
  .abt-partner-card { display: flex; align-items: stretch; }
  .abt-partner-img { width: 42%; height: auto; }
  .abt-partner-body { flex: 1; display: flex; flex-direction: column; justify-content: center; }
}

/* === Our Products page === */
.pdt-balance-card { display: flex; align-items: center; justify-content: space-between; padding: var(--space-4); margin: 20px 0; }
.pdt-balance-label { font-size: 12px; color: var(--color-muted); text-transform: uppercase; letter-spacing: .03em; }
.pdt-balance-value { font-size: 20px; font-weight: 700; color: var(--color-text); }

.pdt-status-banner { display: none; padding: 12px 14px; border-radius: var(--radius-md); font-size: 13px; margin-bottom: 16px; }
.pdt-status-banner.is-success { display: block; background: rgba(16,185,129,.12); color: #0d9668; border: 1px solid rgba(16,185,129,.3); }
.pdt-status-banner.is-error { display: block; background: rgba(239,68,68,.12); color: #dc2626; border: 1px solid rgba(239,68,68,.3); }

.pdt-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 24px; }
.pdt-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.pdt-card-img { width: 100%; aspect-ratio: 1 / 1; overflow: hidden; background: var(--color-bg); }
.pdt-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pdt-card-body { padding: 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.pdt-card-name { font-size: 13px; font-weight: 700; color: var(--color-text); }
.pdt-card-price { font-size: 16px; font-weight: 700; color: var(--color-primary); }
.pdt-card-meta { display: flex; flex-direction: column; gap: 2px; font-size: 11px; color: var(--color-muted); }
.pdt-card-meta strong { color: var(--color-text); }
.pdt-avail-btn { margin-top: 6px; width: 100%; border: none; border-radius: var(--radius-sm); background: var(--color-primary); color: #fff; font-size: 13px; font-weight: 600; padding: 9px 0; cursor: pointer; }
.pdt-avail-btn:disabled { opacity: .6; }

.pdt-section-title { font-size: 16px; color: var(--color-text); margin: 0 0 14px; }

.pdt-invest-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.pdt-invest-item { padding: var(--space-4); }
.pdt-invest-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.pdt-invest-name { font-size: 14px; font-weight: 700; color: var(--color-text); }
.pdt-invest-badge { font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 999px; }
.pdt-invest-badge.active { background: rgba(37,99,235,.12); color: var(--color-primary); }
.pdt-invest-badge.completed { background: rgba(16,185,129,.12); color: #0d9668; }
.pdt-invest-badge.pending { background: rgba(245,158,11,.14); color: #b45309; }
.pdt-invest-badge.refunded { background: rgba(107,114,128,.14); color: #4b5563; }
.pdt-invest-note { font-size: 11px; color: #b45309; margin-top: 8px; background: rgba(245,158,11,.08); padding: 6px 8px; border-radius: 8px; }
.pdt-card-requirement { display: flex; align-items: flex-start; gap: 6px; font-size: 11px; color: #b45309; background: rgba(245,158,11,.08); padding: 6px 8px; border-radius: 8px; margin: 8px 0 4px; }
.pdt-card-requirement svg { flex-shrink: 0; width: 14px; height: 14px; margin-top: 1px; }
.pdt-card-guarantee { display: flex; align-items: flex-start; gap: 6px; font-size: 11px; color: #0d9668; background: rgba(16,185,129,.08); padding: 6px 8px; border-radius: 8px; margin: 4px 0 10px; }
.pdt-card-guarantee svg { flex-shrink: 0; width: 14px; height: 14px; margin-top: 1px; }
.pdt-progress-track { width: 100%; height: 8px; border-radius: 999px; background: var(--color-bg); overflow: hidden; margin-bottom: 6px; }
.pdt-progress-fill { height: 100%; background: var(--color-primary); border-radius: 999px; }
.pdt-invest-stats { display: flex; justify-content: space-between; font-size: 11px; color: var(--color-muted); margin-bottom: 8px; }
.pdt-countdown { font-size: 12px; color: var(--color-text); display: flex; align-items: center; gap: 6px; }
.pdt-countdown svg { width: 14px; height: 14px; color: var(--color-primary); }

@media (min-width: 480px) {
  .pdt-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 720px) {
  .pdt-grid { grid-template-columns: repeat(4, 1fr); }
}

/* === Products page: loading + success modal === */
.pdt-spinner { width: 32px; height: 32px; border: 3px solid var(--color-border); border-top-color: var(--color-primary); border-radius: 50%; animation: pdt-spin 0.7s linear infinite; }
@keyframes pdt-spin { to { transform: rotate(360deg); } }

.pdt-inline-loading { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 30px 0; grid-column: 1 / -1; width: 100%; }
.pdt-inline-loading span { font-size: 12px; color: var(--color-muted); }

.pdt-loading-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.4); display: none; align-items: center; justify-content: center; z-index: 2100; }
.pdt-loading-overlay.is-open { display: flex; }
.pdt-loading-box { background: var(--color-surface); border-radius: var(--radius-lg); padding: 26px 34px; display: flex; flex-direction: column; align-items: center; gap: 12px; box-shadow: var(--shadow-md); }
.pdt-loading-box span { font-size: 13px; color: var(--color-muted); }

.pdt-success-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.5); display: none; align-items: center; justify-content: center; z-index: 2200; padding: 20px; }
.pdt-success-overlay.is-open { display: flex; }
.pdt-success-modal { position: relative; background: var(--color-surface); border-radius: var(--radius-lg); padding: 32px 24px 24px; max-width: 340px; width: 100%; text-align: center; box-shadow: var(--shadow-md); }
.pdt-success-close { position: absolute; top: 12px; right: 12px; width: 30px; height: 30px; border: none; background: var(--color-bg); color: var(--color-muted); border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.pdt-success-close svg { width: 16px; height: 16px; }
.pdt-success-icon { width: 62px; height: 62px; margin: 0 auto 16px; border-radius: 50%; background: rgba(16,185,129,.12); color: #0d9668; display: flex; align-items: center; justify-content: center; }
.pdt-success-icon svg { width: 32px; height: 32px; }
.pdt-success-title { margin: 0 0 8px; font-size: 17px; color: var(--color-text); }
.pdt-success-text { margin: 0 0 22px; font-size: 13px; color: var(--color-muted); line-height: 1.5; }
.pdt-success-actions { display: flex; flex-direction: column; gap: 10px; }
.pdt-success-btn-primary { width: 100%; border: none; border-radius: var(--radius-sm); background: var(--color-primary); color: #fff; font-size: 14px; font-weight: 600; padding: 11px 0; cursor: pointer; }

/* === Products page: tagline === */
.pdt-card-tagline { font-size: 11px; color: var(--color-muted); margin-top: -4px; margin-bottom: 2px; }

/* === Slot Invite Modal (Tree page) === */
.tree-empty-slot {
  cursor: pointer;
  user-select: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.tree-empty-slot:hover {
  transform: scale(1.05);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25);
}

.slot-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 16px;
}
.slot-modal-overlay.show { display: flex; }

.slot-modal-card {
  background: #fff;
  border-radius: 16px;
  max-width: 420px;
  width: 100%;
  padding: 24px;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.slot-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: #64748b;
}

.slot-modal-title {
  margin: 0 0 16px;
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
}

.slot-modal-body { min-height: 60px; }

.slot-modal-hint {
  font-size: 14px;
  color: #475569;
  margin: 0 0 12px;
}

.slot-modal-link-row { display: flex; gap: 8px; }
.slot-modal-link-row input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font-size: 13px;
  background: #f8fafc;
  min-width: 0;
}

.slot-modal-error { color: #dc2626; font-size: 14px; }

.slot-modal-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid #e2e8f0;
  border-top-color: #2563eb;
  border-radius: 50%;
  margin: 0 auto 12px;
  animation: slotSpin 0.8s linear infinite;
}
@keyframes slotSpin { to { transform: rotate(360deg); } }

/* === View Full Tree button === */
.tree-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 16px 0 10px;
}
.tree-view-full-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 10px;
  border: none;
  background: #2563eb;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.tree-view-full-btn:hover { background: #1d4ed8; }
.tree-view-full-btn svg { width: 16px; height: 16px; flex-shrink: 0; }

/* === Full Tree View overlay (zoom & pan) === */
.full-tree-overlay {
  position: fixed;
  inset: 0;
  background: #f1f5f9;
  z-index: 10000;
  display: none;
  flex-direction: column;
}
.full-tree-overlay.show { display: flex; }

.full-tree-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: #1e293b;
  color: #fff;
  flex-shrink: 0;
}
.full-tree-title { font-weight: 700; font-size: 15px; }
.full-tree-controls { display: flex; gap: 8px; align-items: center; }
.full-tree-btn {
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: #fff;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.full-tree-btn:hover { background: rgba(255, 255, 255, 0.22); }
.full-tree-close { font-size: 22px; }

.full-tree-viewport {
  flex: 1;
  overflow: hidden;
  position: relative;
  touch-action: none;
  cursor: grab;
  display: flex;
  align-items: center;
  justify-content: center;
}
.full-tree-viewport.dragging { cursor: grabbing; }

.full-tree-canvas {
  transform-origin: center top;
  padding: 40px;
}

/* === Leaderboard page === */
.lb-header-card {
  background: linear-gradient(135deg, #1e293b 0%, #2563eb 100%);
  color: #fff;
  padding: 24px 20px;
  margin-bottom: 16px;
}
.lb-page-title {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
}
.lb-page-title::before {
  content: "\1F3C6";
  font-size: 22px;
}
.lb-page-sub { margin: 0; font-size: 13px; opacity: 0.85; }

.lb-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 2px;
}
.lb-tab {
  flex-shrink: 0;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #475569;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.lb-tab:hover { border-color: #93c5fd; color: #2563eb; }
.lb-tab.active {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.lb-list-card { padding: 10px 14px; }
.lb-loading { text-align: center; padding: 24px 0; color: #64748b; font-size: 14px; }

.lb-list { list-style: none; margin: 0; padding: 0; }
.lb-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 6px;
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.15s ease;
}
.lb-row:last-child { border-bottom: none; }
.lb-row:hover { background: #f8fafc; }
.lb-row.is-me {
  background: #eff6ff;
  border-radius: 10px;
  box-shadow: inset 0 0 0 1.5px #93c5fd;
}

.lb-rank {
  width: 30px;
  flex-shrink: 0;
  text-align: center;
  font-weight: 700;
  font-size: 15px;
  color: #64748b;
}
.lb-rank.top-1 { font-size: 20px; }
.lb-rank.top-2 { font-size: 19px; }
.lb-rank.top-3 { font-size: 18px; }

.lb-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  overflow: hidden;
}
.lb-avatar img { width: 100%; height: 100%; object-fit: cover; }
.lb-avatar.tier-regular { background: linear-gradient(135deg, #94a3b8, #64748b); }
.lb-avatar.tier-member { background: linear-gradient(135deg, #38bdf8, #2563eb); }
.lb-avatar.tier-premium { background: linear-gradient(135deg, #a78bfa, #7c3aed); }
.lb-avatar.tier-svip { background: linear-gradient(135deg, #fbbf24, #d97706); }

.lb-name {
  flex: 1;
  font-weight: 600;
  font-size: 14px;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lb-value {
  flex-shrink: 0;
  font-weight: 800;
  font-size: 15px;
  color: #2563eb;
  text-align: right;
}
.lb-value small {
  display: block;
  font-weight: 500;
  font-size: 10px;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* === Tree / Genealogy visual polish === */
.tree-summary-card {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.tree-summary-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.tree-invite-card {
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  color: #fff;
}
.tree-invite-card .section-label { color: rgba(255, 255, 255, 0.7) !important; }
.tree-invite-code { color: #fff; font-weight: 700; letter-spacing: 0.5px; }
.tree-invite-card .action-btn {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}
.tree-invite-card .action-btn:hover { background: rgba(255, 255, 255, 0.26); }

.tree-node-circle {
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.12);
  transition: transform 0.15s ease;
}
.tree-node:hover .tree-node-circle { transform: scale(1.06); }

.tree-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  padding: 14px 16px;
}

/* === Drawer menu section labels === */
.drawer-section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.8);
  padding: 16px 16px 6px;
}
.drawer-nav .drawer-section-label:first-child {
  padding-top: 4px;
}

/* === Product discounted price (Plan discount) === */
.pdt-card-price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.pdt-price-original {
  text-decoration: line-through;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 500;
}
.pdt-price-discounted {
  color: #16a34a;
  font-weight: 800;
  font-size: 18px;
}
.pdt-price-badge {
  background: #dcfce7;
  color: #15803d;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* === Wallet Top Up === */
.wallet-topup-btn {
  margin-top: 14px;
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: none;
  background: #fff;
  color: #1e293b;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}
.wallet-topup-btn:hover { background: #f1f5f9; transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0,0,0,.18); }
.wallet-topup-btn:active { transform: translateY(0) scale(.98); box-shadow: none; }

.wallet-pending-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  color: #92400e;
  background: #fef3c7;
  font-size: 13px;
  margin-bottom: 14px;
}
.wallet-pending-banner svg { flex-shrink: 0; width: 20px; height: 20px; }

/* Withdraw button + fee preview (wallet.html) */
.wallet-summary-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.wallet-summary-actions .wallet-topup-btn {
  margin-top: 0;
  flex: 1 1 140px;
}

.wallet-withdraw-btn {
  background: rgba(255, 255, 255, .14);
  border: 1.5px solid rgba(255, 255, 255, .75);
  color: #fff;
}

.wallet-withdraw-btn:hover {
  background: rgba(255, 255, 255, .24);
  transform: translateY(-1px);
}
.wallet-withdraw-btn:active { transform: translateY(0) scale(.98); }

#withdrawFeePreview.upgrade-payment-info {
  font-size: 0.88rem;
  line-height: 1.6;
}

#withdrawFeePreview .wd-fee-row {
  display: flex;
  justify-content: space-between;
  padding: 2px 0;
}

#withdrawFeePreview .wd-fee-row strong {
  font-weight: 600;
}

#withdrawFeePreview .wd-fee-total {
  border-top: 1px dashed rgba(0, 0, 0, 0.12);
  margin-top: 6px;
  padding-top: 6px;
  font-weight: 700;
}

/* ===== Wallet modal entrance polish (Top Up / Withdraw) ===== */
.upgrade-modal-overlay.open {
  animation: walletOverlayFade 180ms ease;
}
@keyframes walletOverlayFade {
  from { opacity: 0; }
  to { opacity: 1; }
}
.upgrade-modal {
  animation: walletModalPop 220ms cubic-bezier(.34, 1.56, .64, 1);
}
@keyframes walletModalPop {
  from { opacity: 0; transform: translateY(14px) scale(.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .upgrade-modal-overlay.open, .upgrade-modal { animation: none; }
}

.upgrade-modal-close {
  transition: color var(--transition), transform var(--transition);
}
.upgrade-modal-close:hover {
  transform: rotate(90deg);
}

.field-row input,
.field-row select {
  transition: border-color var(--transition), box-shadow var(--transition);
}
.field-row input:focus,
.field-row select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-soft);
}

.wallet-pending-banner {
  border-radius: var(--radius-md);
}

/* ===== Task Center ===== */
.points-summary-card {
  background: linear-gradient(135deg, var(--color-success), var(--color-primary));
  color: #fff;
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 28px 20px;
}
.points-summary-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 20%, rgba(255,255,255,0.18) 40%, transparent 60%);
  background-size: 200% 100%;
  animation: walletShine 3.5s ease-in-out infinite;
  pointer-events: none;
}
.points-summary-label {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.88;
  position: relative;
  z-index: 1;
}
.points-summary-value {
  font-size: 40px;
  font-weight: 800;
  margin: 8px 0 4px;
  position: relative;
  z-index: 1;
}
.points-summary-sub {
  font-size: 12px;
  opacity: 0.85;
  position: relative;
  z-index: 1;
}

.checkin-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
  padding: 18px;
}
.checkin-days {
  display: flex;
  gap: 8px;
  justify-content: space-between;
  flex-wrap: wrap;
}
.checkin-day-pill {
  flex: 1 1 0;
  min-width: 38px;
  aspect-ratio: 1;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  border: 2px solid var(--color-border);
  color: var(--color-text-muted);
  background: var(--color-surface);
  transition: all 0.2s ease;
}
.checkin-day-pill .pill-pts {
  font-size: 9px;
  font-weight: 600;
  opacity: 0.75;
  margin-top: 1px;
}
.checkin-day-pill.is-claimed {
  background: var(--color-success);
  border-color: var(--color-success);
  color: #fff;
}
.checkin-day-pill.is-current {
  border-color: var(--color-primary);
  color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-soft);
}
#checkinClaimBtn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.task-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.task-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.task-item:hover {
  box-shadow: var(--shadow-sm);
}
.task-item.is-locked {
  opacity: 0.65;
}
.task-item-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.task-item-icon svg {
  width: 22px;
  height: 22px;
}
.task-item-body {
  flex: 1;
  min-width: 0;
}
.task-item-title {
  font-weight: 700;
  font-size: 14px;
}
.task-item-desc {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-top: 2px;
}
.task-item-progress {
  font-size: 11px;
  color: var(--color-primary);
  margin-top: 4px;
  font-weight: 600;
}
.task-item-points {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-success);
  white-space: nowrap;
  margin-right: 4px;
}
.task-item-action {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}
.task-claim-btn {
  font-size: 12px;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: 999px;
  border: none;
  background: var(--color-primary);
  color: #fff;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.task-claim-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.task-claim-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.task-status-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--color-surface-alt, rgba(120,120,120,0.12));
  color: var(--color-text-muted);
  white-space: nowrap;
}
.task-status-badge.is-done {
  background: rgba(34, 197, 94, 0.15);
  color: var(--color-success);
}

/* ===== Withdraw PIN / Saved Account ===== */
.wd-setup-intro {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-bottom: 16px;
  line-height: 1.5;
}
.wd-saved-account {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: var(--radius-md);
  background: var(--color-surface-alt, rgba(120, 120, 120, 0.08));
  border: 1px solid var(--color-border);
  margin-bottom: 18px;
}
.wd-saved-account-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--color-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
  flex-shrink: 0;
}
.wd-saved-account-info {
  flex: 1;
  min-width: 0;
}
.wd-saved-account-method {
  font-weight: 700;
  font-size: 13px;
}
.wd-saved-account-number {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-top: 2px;
}
.wd-edit-link {
  flex-shrink: 0;
  background: none;
  border: none;
  color: var(--color-primary);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  padding: 4px 8px;
}
.wd-edit-link:hover {
  text-decoration: underline;
}
.wd-edit-actions {
  display: flex;
  gap: 10px;
}
.wd-edit-actions .jsweb-btn {
  flex: 1;
}
.wd-edit-cancel-btn {
  flex: 1;
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  font-weight: 700;
  cursor: pointer;
}
.wd-edit-cancel-btn:hover {
  background: var(--color-surface-alt, rgba(120, 120, 120, 0.08));
}

/* ===== Withdraw Checklist ===== */
.wd-checklist-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px;
  margin-bottom: 10px;
  border-radius: var(--radius-md);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.wd-checklist-row:hover {
  box-shadow: var(--shadow-sm);
  border-color: var(--color-primary);
}
.wd-checklist-row:disabled,
.wd-checklist-row.is-locked {
  opacity: 0.5;
  cursor: not-allowed;
}
.wd-checklist-row:disabled:hover,
.wd-checklist-row.is-locked:hover {
  box-shadow: none;
  border-color: var(--color-border);
}
.wd-checklist-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--color-primary-soft);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.wd-checklist-icon svg {
  width: 20px;
  height: 20px;
}
.wd-checklist-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.wd-checklist-title {
  font-weight: 700;
  font-size: 14px;
}
.wd-checklist-sub {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-top: 2px;
}
.wd-checklist-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  white-space: nowrap;
  flex-shrink: 0;
}
.wd-checklist-badge.is-done {
  background: rgba(34, 197, 94, 0.15);
  color: var(--color-success);
}
.wd-checklist-chevron {
  width: 18px;
  height: 18px;
  color: var(--color-text-muted);
  flex-shrink: 0;
}
.wd-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: var(--color-primary);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  padding: 4px 0;
  margin-bottom: 14px;
}
.wd-back-link svg {
  width: 16px;
  height: 16px;
}
.wd-back-link:hover {
  text-decoration: underline;
}

/* ===== Withdraw Method Picker ===== */
.wd-method-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 8px;
}
.wd-method-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 10px;
  border-radius: var(--radius-md);
  background: var(--color-surface);
  border: 2px solid var(--color-border);
  cursor: pointer;
  position: relative;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.wd-method-card:hover {
  box-shadow: var(--shadow-sm);
}
.wd-method-card.is-selected {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-soft);
}
.wd-method-card.is-soon {
  opacity: 0.55;
  cursor: not-allowed;
}
.wd-method-card.is-soon:hover {
  box-shadow: none;
}
.wd-method-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.wd-method-icon svg {
  width: 22px;
  height: 22px;
}
.wd-method-gcash {
  background: #0071ce;
}
.wd-method-maya {
  background: #00c16e;
}
.wd-method-bank {
  background: #6b5bff;
}
.wd-method-usdt {
  background: #f0a93d;
}
.wd-method-label {
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}
.wd-method-soon-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--color-surface-alt, rgba(120, 120, 120, 0.12));
  color: var(--color-text-muted);
}

/* ===== Withdraw Method Logos ===== */
.wd-method-icon.wd-method-logo {
  background: #fff;
  padding: 6px;
}
.wd-method-icon.wd-method-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 8px;
}

/* ===== Withdraw Modal Header Fix ===== */
#withdrawModalOverlay .upgrade-modal-head {
  display: flex;
  align-items: center;
  gap: 10px;
}
#withdrawModalOverlay .upgrade-modal-head h3 {
  flex: 1;
  margin: 0;
}
.wd-head-back {
  flex-shrink: 0;
}
.wd-saved-account-icon.wd-method-logo {
  background: #fff;
  padding: 6px;
}
.wd-saved-account-icon.wd-method-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 8px;
}
.wd-saved-account-icon.wd-method-bank {
  background: #6b5bff;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.wd-saved-account-icon.wd-method-bank svg {
  width: 20px;
  height: 20px;
}

.connect-row { display: flex; align-items: center; gap: 10px; }
.connect-btn {
  margin-left: auto;
  padding: 6px 16px;
  border-radius: 20px;
  border: 1px solid var(--color-primary, #4f46e5);
  background: transparent;
  color: var(--color-primary, #4f46e5);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.connect-btn:hover { background: var(--color-primary, #4f46e5); color: #fff; }
.connect-btn:disabled { opacity: .5; cursor: default; }

/* ---------- Confirm modal (products page) ---------- */
.pdt-confirm-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.5); display: none; align-items: center; justify-content: center; z-index: 2200; padding: 20px; }
.pdt-confirm-overlay.is-open { display: flex; }
.pdt-confirm-modal { position: relative; background: var(--color-surface); border-radius: var(--radius-lg); padding: 32px 24px 24px; max-width: 340px; width: 100%; text-align: center; box-shadow: var(--shadow-md); }
.pdt-confirm-icon { width: 62px; height: 62px; margin: 0 auto 16px; border-radius: 50%; background: rgba(37,99,235,.12); color: #2563eb; display: flex; align-items: center; justify-content: center; }
.pdt-confirm-icon svg { width: 32px; height: 32px; }
.pdt-confirm-title { margin: 0 0 10px; font-size: 17px; color: var(--color-text); }
.pdt-confirm-text { margin: 0 0 8px; font-size: 14px; color: var(--color-text); line-height: 1.5; font-weight: 600; }
.pdt-confirm-subtext { margin: 0 0 22px; font-size: 13px; color: var(--color-muted); line-height: 1.5; }
.pdt-confirm-actions { display: flex; gap: 10px; }
.pdt-confirm-btn-cancel { flex: 1; border: 1px solid rgba(148,163,184,.4); border-radius: var(--radius-sm); background: transparent; color: var(--color-text); font-size: 14px; font-weight: 600; padding: 11px 0; cursor: pointer; }
.pdt-confirm-btn-primary { flex: 1; border: none; border-radius: var(--radius-sm); background: var(--color-primary); color: #fff; font-size: 14px; font-weight: 600; padding: 11px 0; cursor: pointer; }

/* ---------- Button loading spinner (shared) ---------- */
.btn-spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: btn-spin .7s linear infinite; vertical-align: -2px; margin-right: 6px; }
@keyframes btn-spin { to { transform: rotate(360deg); } }

/* ---------- Wallet swipe container ---------- */
.wallet-swipe-wrap { margin-bottom: var(--space-6); }
.wallet-swipe-track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.wallet-swipe-track::-webkit-scrollbar { display: none; }
.wallet-swipe-track .wallet-card {
  flex: 0 0 100%;
  scroll-snap-align: start;
  margin-bottom: 0;
}
.wallet-swipe-dots { display: flex; justify-content: center; gap: 6px; margin-top: 10px; }
.wallet-swipe-dots .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--color-border); transition: background .2s, width .2s; }
.wallet-swipe-dots .dot.is-active { background: var(--color-primary); width: 18px; border-radius: 3px; }

.points-wallet-card {
  background: linear-gradient(135deg, #000000 0%, #1a1410 55%, #000000 100%);
  border: 1px solid rgba(255,215,0,.5);
  cursor: default;
}
.points-wallet-card .wallet-label,
.points-wallet-card .wallet-tagline,
.points-wallet-card .wallet-sub-label,
.points-wallet-card .wallet-holder { color: #f5cf5b; }
.points-wallet-card .wallet-balance { color: #fff; }
.points-wallet-card .wallet-chip-row { margin: 6px 0; }
.points-balance-row { margin-bottom: 6px !important; }
.points-card-rate { font-size: 10px; opacity: .85; position: relative; z-index: 1; margin-bottom: 7px; color: #f5cf5b; }
.points-card-redeem-row { display: flex; gap: 6px; position: relative; z-index: 1; }
.points-card-redeem-row input {
  flex: 1; min-width: 0; border-radius: 9px; border: 1px solid rgba(255,215,0,.4);
  background: rgba(255,255,255,.08); color: #fff; padding: 6px 9px; font-size: 12px; box-sizing: border-box;
}
.points-card-redeem-row input::placeholder { color: rgba(255,255,255,.5); }
.points-card-btn {
  border: none; border-radius: 9px; background: rgba(255,215,0,.35); color: #ffe08a;
  font-size: 12px; font-weight: 700; padding: 0 14px; cursor: pointer; white-space: nowrap;
}
.points-card-btn:disabled { opacity: .6; cursor: not-allowed; }
.points-card-msg { font-size: 10px; margin: 4px 0 0; position: relative; z-index: 1; min-height: 12px; }
.points-card-msg.err { color: #fca5a5; }
.points-card-msg.ok { color: #86efac; }
.points-badge { background: rgba(255,215,0,.3); color: #ffe08a; }
