/* ============================================================
   No Label Portal - Master Stylesheet
   Design System: Sweeps Coins Frontend Asset Pack
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ── Design Tokens ── */
:root {
  --sc-bg: #050807;
  --sc-surface: #0A110E;
  --sc-surface-alt: #0A110E;
  --sc-surface-hover: #0A110E;
  --sc-lime: #B6FF00;
  --sc-lime-dark: #527300;
  --sc-lime-glow: rgba(182, 255, 0, 0.15);
  --sc-gold: #F5C542;
  --sc-gold-dark: #8B6F1F;
  --sc-purple: #8C3CFF;
  --sc-purple-dark: #4A1F8A;
  --sc-blue: #149BFF;
  --sc-green: #39D353;
  --sc-text: #F7F8F7;
  --sc-text-muted: #AEB6B0;
  --sc-text-dim: #6B756D;
  --sc-border: #1C2B20;
  --sc-danger: #FF4D4D;
  --sc-card-radius: 16px;
  --sc-button-radius: 10px;
  --sc-sidebar-width: 275px;
  --sc-topbar-height: 72px;
  --sc-transition: 0.2s ease;

  /* Aliases used in secondary pages */
  --color-primary: var(--sc-lime);
  --color-primary-glow: var(--sc-lime-glow);
  --color-gold: var(--sc-gold);
  --color-purple: var(--sc-purple);
  --color-blue: var(--sc-blue);
  --color-green: var(--sc-green);
  --color-red: var(--sc-danger);
  --text-secondary: var(--sc-text-muted);
  --text-muted: var(--sc-text-dim);
}

/* ── Reset & Base ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--sc-bg);
  color: var(--sc-text);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: var(--sc-lime);
  text-decoration: none;
  transition: color var(--sc-transition);
}
a:hover {
  color: #d4ff66;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  outline: none;
}

img {
  max-width: 100%;
  display: block;
}

input, select, textarea {
  font-family: inherit;
  outline: none;
}

::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--sc-bg);
}
::-webkit-scrollbar-thumb {
  background: var(--sc-border);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--sc-text-dim);
}

/* ── Layout Shell ── */
.portal-layout {
  display: flex;
  min-height: 100vh;
}

.portal-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sc-sidebar-width);
  height: 100vh;
  background: var(--sc-surface);
  border-right: 1px solid var(--sc-border);
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow-y: auto;
  overflow-x: hidden;
}

.portal-main {
  margin-left: var(--sc-sidebar-width);
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.portal-topbar {
  position: sticky;
  top: 0;
  height: var(--sc-topbar-height);
  background: var(--sc-bg);
  border-bottom: 1px solid var(--sc-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  z-index: 90;
}

.portal-content {
  flex: 1;
  padding: 24px 32px 48px;
}

/* ── Sidebar ── */
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--sc-border);
}

.sidebar-logo-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(135deg, #4ade80, #22c55e);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.sidebar-logo-icon:has(img) {
  background: none;
  width: auto;
  height: auto;
  border-radius: 0;
}

.sidebar-logo-icon img {
  max-width: 180px;
  max-height: 64px;
  width: auto;
  height: auto;
  display: block;
  border-radius: 0;
}

.sidebar-logo-text {
  display: flex;
  flex-direction: column;
}

.sidebar-logo-text .brand-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--sc-text);
  letter-spacing: 1px;
  text-transform: uppercase;
  line-height: 1.2;
}

.sidebar-logo-text .brand-sub {
  font-size: 10px;
  color: var(--sc-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sidebar-nav {
  flex: 1;
  padding: 0 16px;
  display: flex;
  flex-direction: column;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--sc-button-radius);
  color: var(--sc-text-muted);
  font-size: 15px;
  font-weight: 500;
  transition: all var(--sc-transition);
  margin-bottom: 2px;
  cursor: pointer;
  border: 1px solid transparent;
}

.nav-item:hover {
  background: var(--sc-surface-alt);
  color: var(--sc-text);
}

.nav-item.active {
  background: rgba(182, 255, 0, 0.08);
  color: var(--sc-lime);
  border-color: rgba(182, 255, 0, 0.2);
}

.nav-item svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-item.active svg {
  stroke: var(--sc-lime);
}

/* ── VIP Card (sidebar bottom) ── */
.sidebar-vip {
  padding: 16px;
  margin-top: auto;
}

.vip-card {
  background: var(--sc-surface-alt);
  border: 1px solid var(--sc-border);
  border-radius: var(--sc-card-radius);
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.vip-card::before {
  content: '';
  position: absolute;
  top: -30px;
  right: -30px;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(182, 255, 0, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.vip-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--sc-lime);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 4px;
}

.vip-level-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.vip-level-number {
  font-size: 42px;
  font-weight: 800;
  color: var(--sc-text);
  line-height: 1;
}

.vip-badge-icon {
  width: 56px;
  height: 56px;
}

.vip-progress-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.vip-progress-bar {
  flex: 1;
  height: 8px;
  background: var(--sc-bg);
  border-radius: 4px;
  overflow: hidden;
}

.vip-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--sc-lime-dark), var(--sc-lime));
  border-radius: 4px;
  transition: width 0.6s ease;
}

.vip-progress-pct {
  font-size: 13px;
  font-weight: 600;
  color: var(--sc-text-muted);
  min-width: 32px;
  text-align: right;
}

.vip-reward {
  border-top: 1px solid var(--sc-border);
  padding-top: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.vip-reward-text {
  flex: 1;
}

.vip-reward-label {
  font-size: 12px;
  color: var(--sc-text-muted);
}

.vip-reward-value {
  font-size: 14px;
  font-weight: 700;
  color: var(--sc-text);
}

.vip-reward-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

/* ── Top Bar ── */
.topbar-search {
  position: relative;
  width: 360px;
}

.topbar-search input {
  width: 100%;
  height: 44px;
  background: var(--sc-surface);
  border: 1px solid var(--sc-border);
  border-radius: 22px;
  padding: 0 16px 0 44px;
  color: var(--sc-text);
  font-size: 14px;
  transition: border-color var(--sc-transition);
}

.topbar-search input::placeholder {
  color: var(--sc-text-dim);
}

.topbar-search input:focus {
  border-color: var(--sc-lime);
}

.topbar-search svg {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  stroke: var(--sc-text-dim);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.topbar-bell {
  position: relative;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: transparent;
  transition: background var(--sc-transition);
  cursor: pointer;
}

.topbar-bell:hover {
  background: var(--sc-surface);
}

.topbar-bell svg {
  width: 22px;
  height: 22px;
  stroke: var(--sc-text-muted);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.topbar-bell .bell-dot {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 8px;
  height: 8px;
  background: var(--sc-lime);
  border-radius: 50%;
  border: 2px solid var(--sc-bg);
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--sc-button-radius);
  transition: background var(--sc-transition);
}

.topbar-user:hover {
  background: var(--sc-surface);
}

.topbar-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--sc-lime-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  color: var(--sc-lime);
}

.topbar-username {
  font-size: 14px;
  font-weight: 600;
  color: var(--sc-text);
}

.topbar-chevron svg {
  width: 16px;
  height: 16px;
  stroke: var(--sc-text-muted);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ── Hero Wallet Panel ── */
.hero-wallet {
  display: flex;
  gap: 0;
  background: var(--sc-surface);
  border: 1px solid var(--sc-border);
  border-radius: var(--sc-card-radius);
  overflow: hidden;
  margin-bottom: 24px;
  min-height: 240px;
}

.hero-wallet-main {
  flex: 1;
  padding: 32px 36px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background:
    radial-gradient(ellipse at 70% 50%, rgba(182, 255, 0, 0.06) 0%, transparent 60%),
    linear-gradient(135deg, var(--sc-surface) 0%, #0D150F 100%);
}

.hero-wallet-main::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 320px;
  background: radial-gradient(ellipse at center, rgba(182, 255, 0, 0.04) 0%, transparent 70%);
  pointer-events: none;
}

.hero-greeting {
  font-size: 14px;
  color: var(--sc-lime);
  font-weight: 500;
  margin-bottom: 4px;
}

.hero-name {
  font-size: 32px;
  font-weight: 800;
  color: var(--sc-text);
  margin-bottom: 4px;
  line-height: 1.15;
}

.hero-subtitle {
  font-size: 13px;
  color: var(--sc-text-muted);
  margin-bottom: 20px;
}

.hero-wallet-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--sc-text-muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 4px;
}

.hero-wallet-value {
  font-size: 44px;
  font-weight: 800;
  color: var(--sc-text);
  line-height: 1.1;
  margin-bottom: 8px;
}

.hero-wallet-change {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
}

.wallet-change-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(57, 211, 83, 0.12);
  color: var(--sc-green);
  font-size: 13px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
}

.wallet-change-badge svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.wallet-change-text {
  font-size: 13px;
  color: var(--sc-text-muted);
}

.hero-actions {
  display: flex;
  gap: 12px;
  position: relative;
  z-index: 2;
}

.hero-wallet-sidebar {
  width: 300px;
  background: var(--sc-surface-alt);
  border-left: 1px solid var(--sc-border);
  display: flex;
  flex-direction: column;
}

.wallet-detail-item {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--sc-border);
  cursor: pointer;
  transition: background var(--sc-transition);
}

.wallet-detail-item:last-of-type {
  border-bottom: none;
}

.wallet-detail-item:hover {
  background: var(--sc-surface-hover);
}

.wallet-detail-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.wallet-detail-icon.sweeps {
  background: linear-gradient(135deg, #1a4d00, #0d2600);
  border: 1px solid rgba(182, 255, 0, 0.3);
}

.wallet-detail-icon.bonus {
  background: linear-gradient(135deg, #3d1a6e, #1f0d37);
  border: 1px solid rgba(140, 60, 255, 0.3);
}

.wallet-detail-icon.referral {
  background: linear-gradient(135deg, #6b4d00, #362700);
  border: 1px solid rgba(245, 197, 66, 0.3);
}

.wallet-detail-icon svg {
  width: 22px;
  height: 22px;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.wallet-detail-icon.sweeps svg { stroke: var(--sc-lime); }
.wallet-detail-icon.bonus svg { stroke: var(--sc-purple); }
.wallet-detail-icon.referral svg { stroke: var(--sc-gold); }

.wallet-detail-info {
  flex: 1;
  min-width: 0;
}

.wallet-detail-label {
  font-size: 12px;
  color: var(--sc-text-muted);
  margin-bottom: 2px;
}

.wallet-detail-amount {
  font-size: 18px;
  font-weight: 700;
  color: var(--sc-text);
}

.wallet-detail-arrow {
  width: 20px;
  height: 20px;
  stroke: var(--sc-text-dim);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.wallet-view-details {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid var(--sc-border);
  color: var(--sc-text-muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--sc-transition);
}

.wallet-view-details:hover {
  color: var(--sc-text);
  background: var(--sc-surface-hover);
}

.wallet-view-details svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--sc-button-radius);
  font-size: 14px;
  font-weight: 600;
  transition: all var(--sc-transition);
  white-space: nowrap;
}

.btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn-lime {
  background: var(--sc-lime);
  color: #050807;
}
.btn-lime:hover {
  background: #c8ff33;
  box-shadow: 0 0 20px rgba(182, 255, 0, 0.2);
}

.btn-outline {
  background: transparent;
  color: var(--sc-text);
  border: 1px solid var(--sc-border);
}
.btn-outline:hover {
  border-color: var(--sc-text-muted);
  background: var(--sc-surface-alt);
}

.btn-purple {
  background: var(--sc-purple);
  color: var(--sc-text);
}
.btn-purple:hover {
  background: #9d54ff;
  box-shadow: 0 0 20px rgba(140, 60, 255, 0.2);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
}

.btn-sm svg {
  width: 15px;
  height: 15px;
}

/* ── Quick Actions ── */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.quick-action-tile {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: var(--sc-surface);
  border: 1px solid var(--sc-border);
  border-radius: var(--sc-card-radius);
  cursor: pointer;
  transition: all var(--sc-transition);
}

.quick-action-tile:hover {
  border-color: var(--sc-lime);
  background: var(--sc-surface-alt);
  transform: translateY(-2px);
}

.quick-action-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.quick-action-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.quick-action-icon.add-funds {
  background: rgba(182, 255, 0, 0.1);
  border: 1px solid rgba(182, 255, 0, 0.25);
}
.quick-action-icon.add-funds svg { stroke: var(--sc-lime); }

.quick-action-icon.withdraw {
  background: rgba(140, 60, 255, 0.1);
  border: 1px solid rgba(140, 60, 255, 0.25);
}
.quick-action-icon.withdraw svg { stroke: var(--sc-purple); }

.quick-action-icon.history {
  background: rgba(20, 155, 255, 0.1);
  border: 1px solid rgba(20, 155, 255, 0.25);
}
.quick-action-icon.history svg { stroke: var(--sc-blue); }

.quick-action-icon.referral {
  background: rgba(245, 197, 66, 0.1);
  border: 1px solid rgba(245, 197, 66, 0.25);
}
.quick-action-icon.referral svg { stroke: var(--sc-gold); }

.quick-action-text h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--sc-text);
  margin-bottom: 2px;
}

.quick-action-text p {
  font-size: 12px;
  color: var(--sc-text-muted);
}

/* ── Content Grid (Platforms + Activity) ── */
.content-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  margin-bottom: 24px;
}

/* ── Section Header ── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 700;
  color: var(--sc-text);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.section-title::before {
  content: '';
  width: 3px;
  height: 18px;
  background: var(--sc-lime);
  border-radius: 2px;
}

.section-link {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--sc-text-muted);
  transition: color var(--sc-transition);
  cursor: pointer;
}

.section-link:hover {
  color: var(--sc-lime);
}

.section-link svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ── Platform Cards ── */
.platforms-carousel {
  position: relative;
}

.platforms-track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-behavior: smooth;
  -ms-overflow-style: none;
  scrollbar-width: none;
  padding-bottom: 4px;
}

.platforms-track::-webkit-scrollbar {
  display: none;
}

.platform-card {
  min-width: 260px;
  max-width: 280px;
  background: var(--sc-surface);
  border: 1px solid var(--sc-border);
  border-radius: var(--sc-card-radius);
  overflow: hidden;
  flex-shrink: 0;
  transition: all var(--sc-transition);
}

.platform-card:hover {
  border-color: rgba(182, 255, 0, 0.3);
  transform: translateY(-2px);
}

.platform-card-image {
  position: relative;
  /* A PERFECT SQUARE at every width (Travis, 2026-09-17), so square game art fits
     exactly. height:auto is not optional -- an explicit height beats aspect-ratio,
     and this rule is where the old 150px came from. */
  height: auto;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #0d150f;
}

.platform-card-image img {
  width: 100%;
  height: 100%;
  /* contain, and NO padding, so artwork reaches all four edges.
     With a square box and square art, contain and cover are the same thing -- the
     new artwork fills it exactly. contain is kept rather than switched to cover
     because it also protects every logo not yet replaced: the current set is a mix
     of wide wordmarks and tall marks, and cover would enlarge each one and cut off
     its sides until new art lands. */
  object-fit: contain;
  box-sizing: border-box;
}

/* NO ARTWORK -- the platform's own name, never another company's logo.
   Paired with platformArtHtml() in portal.js; see the comment there for why an
   empty platforms.image must not fall through to E.png (which is E-Game's mark).
   DELIBERATELY LIVES IN portal.css AND NOT IN index.html's style block: the same
   card is rendered on the dashboard AND on platforms.html, and a rule that only
   index.html carries would leave the platforms page still borrowing a logo. */
.platform-card-image.no-art {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  text-align: center;
  background: linear-gradient(135deg, #0d150f, #16221a, #0d150f);
}

.platform-card-image.no-art .game-title {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.15;
  color: var(--sc-text);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.platform-card-image .platform-gradient {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(transparent, var(--sc-surface));
}

.platform-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.platform-badge.hot {
  background: var(--sc-danger);
  color: #fff;
}

.platform-badge.vip {
  background: var(--sc-purple);
  color: #fff;
}

.platform-badge.trending {
  background: var(--sc-green);
  color: #050807;
}

.platform-card-body {
  padding: 14px 16px;
}

.platform-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.platform-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--sc-green);
}

.platform-status .status-dot {
  width: 8px;
  height: 8px;
  background: var(--sc-green);
  border-radius: 50%;
}

.platform-last-played {
  font-size: 12px;
  color: var(--sc-text-dim);
}

.platform-card-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  /* card-actions-smaller-20261005 -- the card is max-width:280px with overflow:hidden, so a row that does
     not fit is SLICED, not scrolled. Wrapping drops the second control to its own
     line instead of cutting it. Buttons are also trimmed below so both usually
     still share one line. */
  flex-wrap: wrap;
  row-gap: 8px;
}
.platform-card .platform-card-actions .btn {
  font-size: 11px;
  padding: 5px 9px;
  flex: 0 1 auto;
  min-width: 0;
  white-space: nowrap;
}

.platform-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  transition: all var(--sc-transition);
}

.platform-btn.launch {
  background: var(--sc-lime);
  color: #050807;
}
.platform-btn.launch:hover {
  background: #c8ff33;
}

.platform-btn.launch svg,
.platform-btn-icon svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.platform-btn.launch svg {
  stroke: #050807;
}

.platform-btn-icon {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--sc-surface-alt);
  border: 1px solid var(--sc-border);
  transition: all var(--sc-transition);
  cursor: pointer;
}

.platform-btn-icon:hover {
  border-color: var(--sc-text-dim);
  background: var(--sc-surface-hover);
}

.platform-btn-icon svg {
  stroke: var(--sc-text-muted);
}

.carousel-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sc-border);
  cursor: pointer;
  transition: all var(--sc-transition);
}

.carousel-dot.active {
  background: var(--sc-lime);
  width: 20px;
  border-radius: 4px;
}

.carousel-arrow {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--sc-surface-alt);
  border: 1px solid var(--sc-border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--sc-transition);
}

.carousel-arrow:hover {
  border-color: var(--sc-lime);
  background: var(--sc-surface-hover);
}

.carousel-arrow svg {
  width: 16px;
  height: 16px;
  stroke: var(--sc-text-muted);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.carousel-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Recent Activity ── */
.recent-activity {
  background: var(--sc-surface);
  border: 1px solid var(--sc-border);
  border-radius: var(--sc-card-radius);
  padding: 20px;
  height: fit-content;
}

.activity-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 700;
  color: var(--sc-text);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 20px;
}

.activity-title svg {
  width: 20px;
  height: 20px;
  stroke: var(--sc-lime);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.activity-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.activity-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: var(--sc-button-radius);
  transition: background var(--sc-transition);
}

.activity-item:hover {
  background: var(--sc-surface-alt);
}

.activity-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.activity-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.activity-icon.deposit {
  background: rgba(57, 211, 83, 0.12);
}
.activity-icon.deposit svg { stroke: var(--sc-green); }

.activity-icon.referral-act {
  background: rgba(245, 197, 66, 0.12);
}
.activity-icon.referral-act svg { stroke: var(--sc-gold); }

.activity-icon.withdrawal {
  background: rgba(255, 77, 77, 0.12);
}
.activity-icon.withdrawal svg { stroke: var(--sc-danger); }

.activity-icon.bonus-act {
  background: rgba(140, 60, 255, 0.12);
}
.activity-icon.bonus-act svg { stroke: var(--sc-purple); }

.activity-icon.login {
  background: rgba(20, 155, 255, 0.12);
}
.activity-icon.login svg { stroke: var(--sc-blue); }

.activity-info {
  flex: 1;
  min-width: 0;
}

.activity-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--sc-text);
}

.activity-time {
  font-size: 12px;
  color: var(--sc-text-dim);
}

.activity-amount {
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.activity-amount.positive { color: var(--sc-green); }
.activity-amount.negative { color: var(--sc-danger); }

.activity-view-all {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px;
  margin-top: 8px;
  border: 1px solid var(--sc-border);
  border-radius: var(--sc-button-radius);
  color: var(--sc-text-muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--sc-transition);
  background: transparent;
  width: 100%;
}

.activity-view-all:hover {
  border-color: var(--sc-lime);
  color: var(--sc-text);
}

.activity-view-all svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ── Promo Banners ── */
.promos-section {
  margin-bottom: 24px;
}

.promos-carousel {
  position: relative;
}

.promos-track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-behavior: smooth;
  -ms-overflow-style: none;
  scrollbar-width: none;
  padding-bottom: 4px;
}

.promos-track::-webkit-scrollbar {
  display: none;
}

.promo-banner {
  min-width: 280px;
  flex: 1;
  border-radius: var(--sc-card-radius);
  padding: 24px 28px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--sc-transition);
}

.promo-banner:hover {
  transform: translateY(-2px);
}

.promo-banner.welcome {
  background: linear-gradient(135deg, #0d2600 0%, #1a3d0a 50%, #0A110E 100%);
  border: 1px solid rgba(182, 255, 0, 0.15);
}

.promo-banner.weekend {
  background: linear-gradient(135deg, #1a0d3d 0%, #2d1560 50%, #0A110E 100%);
  border: 1px solid rgba(140, 60, 255, 0.15);
}

.promo-banner.refer {
  background: linear-gradient(135deg, #3d2a00 0%, #5a3f00 50%, #0A110E 100%);
  border: 1px solid rgba(245, 197, 66, 0.15);
}

.promo-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.promo-banner.welcome .promo-label { color: var(--sc-lime); }
.promo-banner.weekend .promo-label { color: var(--sc-text-muted); }
.promo-banner.refer .promo-label { color: var(--sc-gold); }

.promo-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--sc-text);
  line-height: 1.15;
  margin-bottom: 6px;
}

.promo-subtitle {
  font-size: 13px;
  color: var(--sc-text-muted);
}

.promo-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}

/* ── Mobile Sidebar Toggle ── */
.sidebar-toggle {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  background: var(--sc-surface);
  border: 1px solid var(--sc-border);
  border-radius: var(--sc-button-radius);
  cursor: pointer;
}

.sidebar-toggle svg {
  width: 22px;
  height: 22px;
  stroke: var(--sc-text);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 99;
}

.sidebar-close {
  display: none;
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  background: transparent;
  cursor: pointer;
  border-radius: 50%;
}

.sidebar-close:hover {
  background: var(--sc-surface-alt);
}

.sidebar-close svg {
  width: 20px;
  height: 20px;
  stroke: var(--sc-text-muted);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ── Responsive ── */
@media (max-width: 1200px) {
  .content-grid {
    grid-template-columns: 1fr;
  }
  .hero-wallet-sidebar {
    width: 260px;
  }
}

@media (max-width: 1024px) {
  .hero-wallet {
    flex-direction: column;
  }
  .hero-wallet-sidebar {
    width: 100%;
    flex-direction: row;
    border-left: none;
    border-top: 1px solid var(--sc-border);
  }
  .wallet-detail-item {
    border-bottom: none;
    border-right: 1px solid var(--sc-border);
  }
  .wallet-detail-item:last-of-type {
    border-right: none;
  }
  .quick-actions {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .portal-sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }
  .portal-sidebar.open {
    transform: translateX(0);
  }
  .sidebar-overlay.open {
    display: block;
  }
  .sidebar-close {
    display: flex;
  }
  .sidebar-toggle {
    display: flex;
  }
  .portal-main {
    margin-left: 0;
  }
  .portal-topbar {
    padding: 0 16px;
  }
  .portal-content {
    padding: 16px;
  }
  .topbar-search {
    width: 200px;
  }
  .hero-wallet-main {
    padding: 24px 20px;
  }
  .hero-wallet-value {
    font-size: 32px;
  }
  .hero-name {
    font-size: 24px;
  }
  .hero-actions {
    flex-wrap: wrap;
  }
  .hero-wallet-sidebar {
    flex-direction: column;
  }
  .wallet-detail-item {
    border-right: none;
    border-bottom: 1px solid var(--sc-border);
  }
  .quick-actions {
    grid-template-columns: 1fr 1fr;
  }
  .promo-banner {
    min-width: 240px;
  }
}

@media (max-width: 480px) {
  .topbar-search {
    width: 140px;
  }
  .topbar-username {
    display: none;
  }
  .quick-actions {
    grid-template-columns: 1fr;
  }
  .hero-actions {
    flex-direction: column;
  }
  .btn {
    width: 100%;
  }
}

/* ══════════════════════════════════════════════════════════
   Secondary Pages Layout (alternate class names)
   ══════════════════════════════════════════════════════════ */

/* Sidebar (secondary pages use .sidebar instead of .portal-sidebar) */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sc-sidebar-width);
  height: 100vh;
  background: var(--sc-surface);
  border-right: 1px solid var(--sc-border);
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-brand-text {
  font-size: 20px;
  font-weight: 800;
  color: var(--sc-text);
  letter-spacing: 1px;
  text-transform: uppercase;
  line-height: 1.1;
}
.sidebar-brand-text span {
  color: var(--sc-lime);
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--sc-button-radius);
  color: var(--sc-text-muted);
  font-size: 15px;
  font-weight: 500;
  transition: all var(--sc-transition);
  margin-bottom: 2px;
  cursor: pointer;
  border: 1px solid transparent;
}
.sidebar-nav-item:hover {
  background: var(--sc-surface-alt);
  color: var(--sc-text);
}
.sidebar-nav-item.active {
  background: rgba(182, 255, 0, 0.08);
  color: var(--sc-lime);
  border-color: rgba(182, 255, 0, 0.2);
}
.sidebar-nav-item svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}
.sidebar-nav-item.active svg {
  stroke: var(--sc-lime);
}

.sidebar-vip-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--sc-lime);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 4px;
}
.sidebar-vip-level {
  font-size: 42px;
  font-weight: 800;
  color: var(--sc-text);
  line-height: 1;
  margin-bottom: 14px;
}
.sidebar-vip-progress-track {
  height: 8px;
  background: var(--sc-bg);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 12px;
}
.sidebar-vip-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--sc-lime-dark), var(--sc-lime));
  border-radius: 4px;
  transition: width 0.6s ease;
}
.sidebar-vip-reward {
  font-size: 12px;
  color: var(--sc-text-muted);
}
.sidebar-vip-reward-label {
  color: var(--sc-text-dim);
}
.sidebar-vip-reward-value {
  color: var(--sc-lime);
  font-weight: 600;
}

/* VIP Card (shared across all pages) */
.vip-card-html {
  background: var(--sc-surface-alt);
  border: 1px solid var(--sc-border);
  border-radius: var(--sc-card-radius);
  padding: 16px;
  position: relative;
  overflow: hidden;
}
.vip-card-html::before {
  content: '';
  position: absolute;
  top: -30px; right: -30px;
  width: 120px; height: 120px;
  background: radial-gradient(circle, rgba(182,255,0,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.vip-header { font-size: 11px; font-weight: 600; color: var(--sc-lime); text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 4px; }
.vip-progress { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.vip-progress-track { flex: 1; height: 7px; background: var(--sc-bg); border-radius: 4px; overflow: hidden; }
.vip-progress-bar { height: 100%; background: linear-gradient(90deg, var(--sc-lime-dark), var(--sc-lime)); border-radius: 4px; }
.vip-progress-pct { font-size: 12px; font-weight: 600; color: var(--sc-text-muted); }
.vip-reward-row { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--sc-border); padding-top: 10px; }
.vip-reward-label { font-size: 11px; color: var(--sc-text-muted); }
.vip-reward-val { font-size: 13px; font-weight: 600; color: var(--sc-text); }

/* Header Dropdown */
.header-user { position: relative; cursor: pointer; }
.header-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 180px;
  background: var(--sc-surface);
  border: 1px solid var(--sc-border);
  border-radius: 10px;
  padding: 6px;
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: all 0.2s ease;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}
.header-dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.header-dropdown a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--sc-text-muted);
  text-decoration: none;
  transition: background 0.15s;
}
.header-dropdown a:hover {
  background: var(--sc-surface-alt);
  color: var(--sc-text);
}
.header-dropdown a svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; flex-shrink: 0; }
.header-dropdown-divider { height: 1px; background: var(--sc-border); margin: 4px 0; }

/* Main content area (secondary) */
.main-content {
  margin-left: var(--sc-sidebar-width);
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  /* THE ONE LINE THAT LETS .table-wrap DO ITS JOB.
     This is a flex item of .portal-layout, and a flex item defaults to
     min-width:auto -- it refuses to shrink below its own content. So a wide
     table stretched this box past the viewport and dragged the whole PAGE into
     horizontal scroll, while .table-wrap's overflow-x:auto sat there doing
     nothing, because it never had a bounded width to scroll inside.
     Isolated by testing candidates in the live DOM at a 390px viewport:
       .table-wrap{max-width:100%}   -> 686px, no effect (proves it is not the wrapper)
       .main-content{min-width:0}    -> 390px, fixed
     Every portal page with a table was affected, not just the wide ones. */
  min-width: 0;
}

/* Header bar (secondary) */
.header-bar {
  position: sticky;
  top: 0;
  height: var(--sc-topbar-height);
  background: var(--sc-bg);
  border-bottom: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  z-index: 90;
}

.mobile-menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  background: var(--sc-surface);
  border: 1px solid var(--sc-border);
  border-radius: var(--sc-button-radius);
  cursor: pointer;
}
.mobile-menu-btn svg {
  width: 22px;
  height: 22px;
  stroke: var(--sc-text);
  fill: none;
  stroke-width: 2;
}

.header-search {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--sc-surface);
  border: 1px solid var(--sc-border);
  border-radius: var(--sc-button-radius);
  padding: 0 16px;
  height: 44px;
  flex: 1;
  max-width: 400px;
}
.header-search svg {
  width: 20px;
  height: 20px;
  stroke: var(--sc-text-dim);
  fill: none;
  flex-shrink: 0;
}
.header-search input {
  background: transparent;
  border: none;
  color: var(--sc-text);
  font-size: 14px;
  width: 100%;
}
.header-search input::placeholder {
  color: var(--sc-text-dim);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-notification {
  position: relative;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--sc-surface);
  border: 1px solid var(--sc-border);
  border-radius: var(--sc-button-radius);
  cursor: pointer;
  transition: all var(--sc-transition);
}
.header-notification:hover {
  border-color: var(--sc-text-dim);
}
.header-notification svg {
  width: 20px;
  height: 20px;
  stroke: var(--sc-text-muted);
  fill: none;
  stroke-width: 2;
}
.header-notification-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 8px;
  height: 8px;
  background: var(--sc-danger);
  border-radius: 50%;
}

.header-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  background: var(--sc-surface);
  border: 1px solid var(--sc-border);
  border-radius: var(--sc-button-radius);
  cursor: pointer;
  transition: all var(--sc-transition);
}
.header-user:hover {
  border-color: var(--sc-text-dim);
}
.header-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(182, 255, 0, 0.15);
  color: var(--sc-lime);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
}
.header-user-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--sc-text);
}
.header-user-chevron svg {
  width: 16px;
  height: 16px;
  stroke: var(--sc-text-dim);
  fill: none;
}

/* Page content area (secondary) */
.page-content {
  flex: 1;
  padding: 24px 32px 48px;
}

/* ══════════════════════════════════════════════════════════
   Shared Components (cards, forms, tables, badges)
   ══════════════════════════════════════════════════════════ */

/* Card */
.card {
  background: var(--sc-surface);
  border: 1px solid var(--sc-border);
  border-radius: var(--sc-card-radius);
  padding: 24px;
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 700;
  color: var(--sc-text);
}

/* Stat cards */
.stat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}
.stat-card {
  background: var(--sc-surface);
  border: 1px solid var(--sc-border);
  border-radius: var(--sc-card-radius);
  padding: 20px;
}
.stat-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}
.stat-card-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.stat-card-label {
  font-size: 13px;
  color: var(--sc-text-muted);
  margin-bottom: 4px;
}
.stat-card-value {
  font-size: 24px;
  font-weight: 800;
  color: var(--sc-text);
}

/* Forms */
.form-group {
  margin-bottom: 16px;
  flex: 1;
}
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--sc-text-muted);
  margin-bottom: 6px;
}
.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 12px 16px;
  background: var(--sc-bg);
  border: 1px solid var(--sc-border);
  border-radius: var(--sc-button-radius);
  color: var(--sc-text);
  font-size: 14px;
  transition: border-color var(--sc-transition);
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--sc-lime);
  outline: none;
}
.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--sc-text-dim);
}
.form-textarea {
  min-height: 120px;
  resize: vertical;
}
.form-hint {
  font-size: 12px;
  color: var(--sc-text-dim);
  margin-top: 4px;
}
.form-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}
.form-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--sc-lime);
  cursor: pointer;
}
.form-checkbox label {
  font-size: 14px;
  color: var(--sc-text);
  cursor: pointer;
}

/* Buttons (secondary naming) */
.btn-primary {
  background: var(--sc-lime);
  color: #050807;
}
.btn-primary:hover {
  background: #c8ff33;
  box-shadow: 0 0 20px rgba(182, 255, 0, 0.2);
}
.btn-secondary {
  background: transparent;
  color: var(--sc-text);
  border: 1px solid var(--sc-border);
}
.btn-secondary:hover {
  border-color: var(--sc-text-muted);
  background: var(--sc-surface-alt);
}
.btn-outline {
  background: transparent;
  border: 1px solid var(--sc-lime);
  color: var(--sc-lime);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.btn-outline:hover {
  background: rgba(182,255,0,0.1);
}
.btn-outline svg { stroke: var(--sc-lime); }
.btn-ghost {
  background: transparent;
  color: var(--sc-text-muted);
  border: 1px solid var(--sc-border);
}
.btn-ghost:hover {
  border-color: var(--sc-text-dim);
  background: var(--sc-surface-alt);
}
.btn-danger {
  background: rgba(255, 77, 77, 0.15);
  color: var(--sc-danger);
  border: 1px solid rgba(255, 77, 77, 0.3);
}
.btn-danger:hover {
  background: rgba(255, 77, 77, 0.25);
}
.w-full {
  width: 100%;
}

/* Tables */
.table-wrap {
  overflow-x: auto;
}
.table-wrap table {
  /* portal-qa-sweep-20261005 (mobile-table-scroll): width:100% forced every
     table to exactly fill .table-wrap, which is what defeated the horizontal
     scroll the MOBILE FIXES -- 2026-09-29 and ROUND 2 -- 2026-10-01 blocks
     below both assume is already happening (their own measurements, e.g.
     "588px inside a 356px box", only make sense if the table can grow past
     100%). width:auto with min-width:100% keeps a table whose content
     already fits at full width (desktop unaffected -- verified against the
     QA sweep's desktop screenshots) and lets one that does not fit grow past
     the wrapper, so the existing overflow-x:auto and the scrollbar/edge-fade
     rules below actually engage instead of every column getting squeezed
     into a word-wrapped date. */
  width: auto;
  min-width: 100%;
  border-collapse: collapse;
}
.table-wrap th {
  text-align: left;
  padding: 14px 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--sc-text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--sc-border);
  background: var(--sc-surface-alt);
}
.table-wrap td {
  padding: 14px 16px;
  font-size: 14px;
  color: var(--sc-text);
  border-bottom: 1px solid rgba(28, 43, 32, 0.5);
}
.table-wrap tbody tr:hover {
  background: var(--sc-surface-alt);
}

/* ══════════════════════════════════════════════════════════
   Settings Page
   ══════════════════════════════════════════════════════════ */
.settings-section {
  margin-bottom: 24px;
}
.settings-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 700;
  color: var(--sc-text);
  margin-bottom: 20px;
}
.settings-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* ══════════════════════════════════════════════════════════
   Wallet Page
   ══════════════════════════════════════════════════════════ */
.wallet-hero {
  display: flex;
  align-items: stretch;
  gap: 24px;
  margin-bottom: 24px;
}
.wallet-hero-left {
  flex: 1;
}
.wallet-hero-right {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  flex: 1.5;
}
.wallet-hero-value {
  font-size: 48px;
  font-weight: 800;
  color: var(--sc-text);
  line-height: 1.1;
  margin-bottom: 8px;
}
.wallet-hero-label {
  font-size: 13px;
  color: var(--sc-text-muted);
  margin-bottom: 4px;
}
.wallet-hero-change {
  font-size: 13px;
  color: var(--sc-green);
  font-weight: 600;
}
.wallet-hero-card {
  background: var(--sc-surface);
  border: 1px solid var(--sc-border);
  border-radius: var(--sc-card-radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.wallet-hero-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.wallet-hero-card-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.wallet-hero-card-label {
  font-size: 12px;
  color: var(--sc-text-muted);
}
.wallet-hero-card-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--sc-text);
}
.wallet-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

/* ══════════════════════════════════════════════════════════
   Transactions Page
   ══════════════════════════════════════════════════════════ */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.filter-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.filter-pill {
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  background: var(--sc-surface);
  border: 1px solid var(--sc-border);
  color: var(--sc-text-muted);
  cursor: pointer;
  transition: all var(--sc-transition);
}
.filter-pill:hover {
  border-color: var(--sc-text-dim);
  color: var(--sc-text);
}
.filter-pill.active {
  background: rgba(182, 255, 0, 0.1);
  border-color: rgba(182, 255, 0, 0.3);
  color: var(--sc-lime);
}
.date-range-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.form-label-inline {
  font-size: 13px;
  font-weight: 600;
  color: var(--sc-text-muted);
}
.form-input-sm {
  padding: 8px 12px;
  background: var(--sc-bg);
  border: 1px solid var(--sc-border);
  border-radius: var(--sc-button-radius);
  color: var(--sc-text);
  font-size: 13px;
  transition: border-color var(--sc-transition);
}
.form-input-sm:focus {
  border-color: var(--sc-lime);
  outline: none;
}

/* Type & Status Badges */
.type-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.type-badge.deposit {
  background: rgba(57, 211, 83, 0.15);
  color: var(--sc-green);
}
.type-badge.withdrawal {
  background: rgba(255, 77, 77, 0.15);
  color: var(--sc-danger);
}
.type-badge.referral {
  background: rgba(245, 197, 66, 0.15);
  color: var(--sc-gold);
}
.type-badge.bonus {
  background: rgba(140, 60, 255, 0.15);
  color: var(--sc-purple);
}

.status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.status-badge.completed,
.status-badge.approved {
  background: rgba(57, 211, 83, 0.15);
  color: var(--sc-green);
}
.status-badge.pending {
  background: rgba(245, 197, 66, 0.15);
  color: var(--sc-gold);
}
.status-badge.open {
  background: rgba(20, 155, 255, 0.15);
  color: var(--sc-blue);
}
.status-badge.replied {
  background: rgba(140, 60, 255, 0.15);
  color: var(--sc-purple);
}
.status-badge.closed {
  background: rgba(107, 117, 109, 0.15);
  color: var(--sc-text-dim);
}
/* portal-qa-sweep-20261005 (support-ticket-badge): tickets can also be resolved/
   in_progress; portal.js now emits status-badge for every ticket status
   instead of the unstyled badge-* classes it used before (badge,
   badge-success, badge-warning, badge-info, badge-neutral matched nothing in
   this file), so these two modifiers need to exist. Colours reuse the
   existing palette: resolved reads as done (same green as
   completed/approved), in-progress reads as pending (same gold as
   .pending). */
.status-badge.resolved {
  background: rgba(57, 211, 83, 0.15);
  color: var(--sc-green);
}
.status-badge.in-progress {
  background: rgba(245, 197, 66, 0.15);
  color: var(--sc-gold);
}
/* refund-badge-20261013. A FAILED LOAD IS A REFUND AND MUST NOT LOOK LIKE A LOSS.
   money_drain.refund_player_failed() and api.php's nl_pq_refund_recharge_rows()
   both put the money back before closing the row, and they are the ONLY writers
   that reach type='adjustment' + status='failed' -- so the player is being told
   their funds returned. Soft blue, the same pair .open already uses: calm and
   informational. Deliberately NOT --sc-danger, and deliberately NOT the green of
   .completed, which would assert success on a row whose stored status is failure. */
.status-badge.refunded {
  background: rgba(20, 155, 255, 0.15);
  color: var(--sc-blue);
}
/* AND `cancelled` HAD NO RULE EITHER, and there is a live row: a redemption the
   operator declined. player-api.php tells that player "Nothing was taken - your
   credits are still on <platform>", so nothing was lost and the badge must not
   suggest otherwise. Muted grey, same as .closed. Found by enumerating every
   (type, status) pair against the rules this file defines rather than by eye. */
.status-badge.cancelled {
  background: rgba(107, 117, 109, 0.15);
  color: var(--sc-text-dim);
}
/* AND `failed` WAS UNSTYLED ENTIRELY until now -- this file defined approved,
   closed, completed, in-progress, open, pending, replied and resolved, and nothing
   for failed, so every genuine failure rendered as bare text. Muted grey, the same
   pair .closed uses: terminal and unremarkable, and visibly not success. */
.status-badge.failed {
  background: rgba(107, 117, 109, 0.15);
  color: var(--sc-text-dim);
}

.amount-positive {
  color: var(--sc-green);
  font-weight: 600;
}
.amount-negative {
  color: var(--sc-danger);
  font-weight: 600;
}

/* ══════════════════════════════════════════════════════════
   Platforms Page (full page grid)
   ══════════════════════════════════════════════════════════ */
.platform-grid {
  display: grid;
  /* platform-grid-3col-20261006 -- pinned to three per row. auto-fill with a 300px
     minimum packed in as many columns as happened to fit and left the remainder as
     slack on the right, which is the empty space this replaces. A fixed count always
     divides the full width evenly. The 1100px step below keeps three from crushing
     the cards on a laptop or tablet; below 768px an existing rule already gives one. */
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

@media (max-width: 1100px) {
  .platform-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
.platform-card-full {
  background: var(--sc-surface);
  border: 1px solid var(--sc-border);
  border-radius: var(--sc-card-radius);
  overflow: hidden;
  transition: all var(--sc-transition);
}
.platform-card-full:hover {
  border-color: rgba(182, 255, 0, 0.3);
  transform: translateY(-2px);
}
.platform-card-full .platform-card-image {
  position: relative;
  /* art-fills-card-20261005 -- NOT a fixed height. The base rule carries aspect-ratio:1/1 and warns
     that an explicit height beats it, so `height:160px` pinned the WIDTH to 160
     inside a 354px card and left a dead strip beside the art. */
  height: auto;
  width: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.platform-card-full .platform-card-image.cash-frenzy {
  background: linear-gradient(135deg, #0d2600, #1a3d0a);
}
.platform-card-full .platform-card-image.cash-machine {
  background: linear-gradient(135deg, #1a0d3d, #2d1560);
}
.platform-card-full .platform-card-image.fire-kirin {
  background: linear-gradient(135deg, #3d1a00, #5a2d00);
}
.platform-card-full .platform-card-image.panda-master {
  background: linear-gradient(135deg, #003d1a, #005a2d);
}
.platform-card-full .platform-card-image.orion-stars {
  background: linear-gradient(135deg, #001a3d, #002d5a);
}
.platform-card-full .platform-card-image.game-vault {
  background: linear-gradient(135deg, #1a3d00, #2d5a00);
}
.platform-card-full .platform-card-image svg {
  width: 64px;
  height: 64px;
  stroke: currentColor;
  fill: none;
  opacity: 0.5;
}

.platform-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.platform-tag.hot {
  background: var(--sc-danger);
  color: #fff;
}
.platform-tag.vip {
  background: var(--sc-purple);
  color: #fff;
}
.platform-tag.trending {
  background: var(--sc-green);
  color: #050807;
}

.platform-card-full .platform-card-body {
  padding: 16px 20px;
}
.platform-card-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--sc-text);
  margin-bottom: 4px;
}
.platform-card-balance {
  font-size: 14px;
  font-weight: 600;
  color: var(--sc-lime);
  margin-bottom: 6px;
}

.platform-card-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
}
.platform-card-status .status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.platform-card-status .status-dot.active {
  background: var(--sc-green);
}
.platform-card-status .status-dot.inactive {
  background: var(--sc-text-dim);
}
.platform-card-status.active {
  color: var(--sc-green);
}
.platform-card-status.inactive {
  color: var(--sc-text-dim);
}

.platform-card-lastplayed {
  font-size: 12px;
  color: var(--sc-text-dim);
  margin-bottom: 14px;
}

.platform-card-full .platform-card-actions {
  display: flex;
  gap: 8px;
  /* card-actions-nowrap-fix-20261005
     Measured 2026-10-05: 351px of buttons in a 312px row, nowrap, inside a card
     with overflow:hidden -- so the last control ("Connect Existing Account" on a
     connect_existing site, "Credentials" on a linked one) was sliced off at the
     card edge. The card has no fixed height, so wrapping GROWS it instead of
     hiding the button. */
  flex-wrap: wrap;
  row-gap: 8px;
  justify-content: flex-start;
}
/* Let a long label shrink rather than shove its neighbour off the edge. */
.platform-card-full .platform-card-actions > * {
  min-width: 0;
  flex: 0 1 auto;
}

/* ══════════════════════════════════════════════════════════
   Promotions Page
   ══════════════════════════════════════════════════════════ */
.promo-banner-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.promo-banner-card {
  border-radius: var(--sc-card-radius);
  padding: 28px;
  position: relative;
  overflow: hidden;
  transition: transform var(--sc-transition);
}
.promo-banner-card:hover {
  transform: translateY(-2px);
}
.promo-banner-card.welcome {
  background: linear-gradient(135deg, #0d2600 0%, #1a3d0a 50%, #0A110E 100%);
  border: 1px solid rgba(182, 255, 0, 0.15);
}
.promo-banner-card.weekend {
  background: linear-gradient(135deg, #1a0d3d 0%, #2d1560 50%, #0A110E 100%);
  border: 1px solid rgba(140, 60, 255, 0.15);
}
.promo-banner-card.referral {
  background: linear-gradient(135deg, #3d2a00 0%, #5a3f00 50%, #0A110E 100%);
  border: 1px solid rgba(245, 197, 66, 0.15);
}
.promo-banner-card.cashback {
  background: linear-gradient(135deg, #001a3d 0%, #002d5a 50%, #0A110E 100%);
  border: 1px solid rgba(20, 155, 255, 0.15);
}
.promo-banner-card.locked {
  opacity: 0.6;
}

.promo-banner-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 0;
}
.promo-banner-content {
  position: relative;
  z-index: 1;
}

.promo-banner-tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
}
.promo-banner-card.welcome .promo-banner-tag {
  background: rgba(182, 255, 0, 0.15);
  color: var(--sc-lime);
}
.promo-banner-card.weekend .promo-banner-tag {
  background: rgba(140, 60, 255, 0.15);
  color: var(--sc-purple);
}
.promo-banner-card.referral .promo-banner-tag {
  background: rgba(245, 197, 66, 0.15);
  color: var(--sc-gold);
}
.promo-banner-card.cashback .promo-banner-tag {
  background: rgba(20, 155, 255, 0.15);
  color: var(--sc-blue);
}

.promo-banner-headline {
  font-size: 28px;
  font-weight: 800;
  color: #fff;
  line-height: 1.15;
  margin-bottom: 6px;
}
.promo-banner-sub {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 16px;
}

.promo-banner-details {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}
.promo-detail-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
}
.promo-detail-item svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Active promotions section */
.active-promos {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.active-promo-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--sc-surface);
  border: 1px solid var(--sc-border);
  border-radius: var(--sc-card-radius);
}
.active-promo-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.active-promo-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.active-promo-info {
  flex: 1;
}
.active-promo-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--sc-text);
  margin-bottom: 2px;
}
.active-promo-meta {
  font-size: 12px;
  color: var(--sc-text-dim);
}

/* ══════════════════════════════════════════════════════════
   Affiliates / Referral Page
   ══════════════════════════════════════════════════════════ */
.referral-link-box {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.referral-link-box input {
  flex: 1;
  padding: 12px 16px;
  background: var(--sc-bg);
  border: 1px solid var(--sc-border);
  border-radius: var(--sc-button-radius);
  color: var(--sc-text);
  font-size: 14px;
  font-family: monospace;
}
.copy-btn {
  white-space: nowrap;
}

/* ══════════════════════════════════════════════════════════
   Support Page
   ══════════════════════════════════════════════════════════ */
.ticket-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ticket-card {
  background: var(--sc-surface);
  border: 1px solid var(--sc-border);
  border-radius: var(--sc-card-radius);
  padding: 20px;
  transition: all var(--sc-transition);
}
.ticket-card:hover {
  border-color: rgba(182, 255, 0, 0.2);
}
.ticket-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.ticket-card-subject {
  font-size: 15px;
  font-weight: 600;
  color: var(--sc-text);
}
.ticket-card-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 8px;
}
.ticket-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--sc-text-dim);
}
.ticket-meta-item svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
.ticket-card-preview {
  font-size: 13px;
  color: var(--sc-text-muted);
  line-height: 1.5;
}

/* ══════════════════════════════════════════════════════════
   Secondary Pages Responsive
   ══════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .wallet-hero {
    flex-direction: column;
  }
  .wallet-hero-right {
    grid-template-columns: 1fr;
  }
  .wallet-grid {
    grid-template-columns: 1fr;
  }
  .settings-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .mobile-menu-btn {
    display: flex;
  }
  .main-content {
    margin-left: 0;
  }
  .header-bar {
    padding: 0 16px;
  }
  .page-content {
    padding: 16px;
  }
  .promo-banner-grid {
    grid-template-columns: 1fr;
  }
  .platform-grid {
    grid-template-columns: 1fr;
  }
  .wallet-hero-value {
    font-size: 36px;
  }
  .date-range-group {
    flex-direction: column;
    align-items: flex-start;
  }
  .header-user-name {
    display: none;
  }
}

/* ── Utility ── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.hidden {
  display: none !important;
}

/* ============================================================
   DASHBOARD CLASS ALIASES
   Maps dashboard-specific classes to the existing CSS rules
   ============================================================ */

/* VIP Card aliases */
.vip-card { background: var(--sc-surface-alt); border: 1px solid var(--sc-border); border-radius: var(--sc-card-radius); padding: 16px; }
.vip-label { font-size: 11px; font-weight: 600; color: var(--sc-lime); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 4px; }
.vip-level-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.vip-level-number { font-size: 42px; font-weight: 800; color: var(--sc-text); line-height: 1; }
.vip-badge-icon { width: 56px; height: 56px; }
.vip-progress-wrap { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.vip-progress-bar { flex: 1; height: 8px; background: rgba(182, 255, 0, 0.15); border-radius: 4px; overflow: hidden; }
.vip-progress-fill { height: 100%; background: var(--sc-lime); border-radius: 4px; }
.vip-progress-pct { font-size: 12px; color: var(--sc-lime); font-weight: 600; }
.vip-reward { display: flex; align-items: center; justify-content: space-between; padding-top: 12px; border-top: 1px solid var(--sc-border); }
.vip-reward-text {}
.vip-reward-label { font-size: 11px; color: var(--sc-text-muted); }
.vip-reward-value { font-size: 14px; font-weight: 600; color: var(--sc-text); }
.vip-reward-icon { width: 32px; height: 32px; }

/* Top bar aliases */
.topbar-search { display: flex; align-items: center; background: var(--sc-surface); border: 1px solid var(--sc-border); border-radius: 24px; padding: 8px 16px; gap: 8px; flex: 1; max-width: 400px; }
.topbar-search svg { width: 18px; height: 18px; stroke: var(--sc-lime); flex-shrink: 0; }
.topbar-search input { background: none; border: none; color: var(--sc-text); font-size: 14px; width: 100%; outline: none; font-family: Inter, sans-serif; }
.topbar-search input::placeholder { color: var(--sc-text-muted); }
.topbar-actions { display: flex; align-items: center; gap: 16px; }
.topbar-bell { background: none; border: none; cursor: pointer; position: relative; padding: 8px; }
.topbar-bell svg { width: 20px; height: 20px; stroke: var(--sc-text-muted); }
.topbar-bell:hover svg { stroke: var(--sc-text); }
.bell-dot { position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; background: var(--sc-lime); border-radius: 50%; }
.topbar-user { display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 4px 8px; border-radius: 8px; }
.topbar-user:hover { background: var(--sc-surface-alt); }
.topbar-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--sc-surface-alt); border: 2px solid var(--sc-lime-dark); display: flex; align-items: center; justify-content: center; font-weight: 600; color: var(--sc-lime); font-size: 14px; }
.topbar-username { font-size: 14px; font-weight: 500; color: var(--sc-text); }
.topbar-chevron svg { width: 14px; height: 14px; stroke: var(--sc-text-muted); }

/* Hero wallet aliases */
.hero-wallet { position: relative; background: linear-gradient(135deg, #0A1A0E 0%, #0D2A12 40%, #0A110E 100%); border-radius: var(--sc-card-radius); padding: 32px; margin-bottom: 24px; display: flex; gap: 24px; overflow: hidden; border: 1px solid var(--sc-border); }
.hero-wallet::before { content: ''; position: absolute; top: -50%; right: -10%; width: 60%; height: 200%; background: radial-gradient(circle, rgba(182,255,0,0.06) 0%, transparent 60%); pointer-events: none; }
.hero-wallet-main { flex: 1; position: relative; z-index: 1; }
.hero-greeting { font-size: 16px; color: var(--sc-lime); font-weight: 500; }
.hero-name { font-size: 36px; font-weight: 800; color: var(--sc-text); margin: 4px 0 8px; }
.hero-subtitle { font-size: 14px; color: var(--sc-text-muted); margin-bottom: 20px; }
.hero-wallet-label { font-size: 12px; font-weight: 600; color: var(--sc-text-muted); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 4px; }
.hero-wallet-amount { font-size: 48px; font-weight: 800; color: var(--sc-text); line-height: 1.1; }
.hero-change { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--sc-green); background: rgba(57,211,83,0.1); padding: 4px 10px; border-radius: 20px; margin: 8px 0 20px; }
.hero-change svg { width: 14px; height: 14px; }
.hero-change-label { font-size: 13px; color: var(--sc-text-muted); margin-left: 8px; }
.hero-btns { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px; border-radius: var(--sc-button-radius); font-size: 14px; font-weight: 600; cursor: pointer; border: 1px solid; transition: all 0.2s; text-decoration: none; }
.hero-btn.add-funds { background: transparent; border-color: var(--sc-lime); color: var(--sc-lime); }
.hero-btn.add-funds:hover { background: rgba(182,255,0,0.1); }
.hero-btn.withdraw { background: transparent; border-color: var(--sc-text-muted); color: var(--sc-text); }
.hero-btn.withdraw:hover { background: rgba(255,255,255,0.05); }
.hero-btn.claim-bonus { background: var(--sc-lime); border-color: var(--sc-lime); color: #050807; }
.hero-btn.claim-bonus:hover { background: #A0E600; }
.hero-btn svg { width: 16px; height: 16px; }

/* Hero wallet sidebar (breakdown cards) */
.hero-wallet-aside { width: 300px; display: flex; flex-direction: column; gap: 8px; position: relative; z-index: 1; }
.wallet-card { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--sc-surface-alt); border-radius: 12px; cursor: pointer; transition: background 0.2s; }
.wallet-card:hover { background: var(--sc-surface-hover, #1a2a1e); }
.wallet-card-icon { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.wallet-card-icon.sweeps { background: rgba(57,211,83,0.15); }
.wallet-card-icon.sweeps svg { stroke: var(--sc-green); }
.wallet-card-icon.bonus { background: rgba(140,60,255,0.15); }
.wallet-card-icon.bonus svg { stroke: var(--sc-purple); }
.wallet-card-icon.referral { background: rgba(245,197,66,0.15); }
.wallet-card-icon.referral svg { stroke: var(--sc-gold); }
.wallet-card-icon svg { width: 20px; height: 20px; }
.wallet-card-info { flex: 1; }
.wallet-card-label { font-size: 12px; color: var(--sc-text-muted); }
.wallet-card-value { font-size: 18px; font-weight: 700; color: var(--sc-text); }
.wallet-card-arrow svg { width: 16px; height: 16px; stroke: var(--sc-text-muted); }
.wallet-details-link { text-align: right; margin-top: 4px; }
.wallet-details-link a { font-size: 13px; color: var(--sc-lime); text-decoration: none; }
.wallet-details-link a:hover { text-decoration: underline; }

/* Quick actions aliases */
.quick-actions-row { display: flex; gap: 16px; margin-bottom: 24px; }
.qa-card { flex: 1; display: flex; align-items: center; gap: 14px; padding: 16px; background: var(--sc-surface); border: 1px solid var(--sc-border); border-radius: var(--sc-card-radius); cursor: pointer; transition: all 0.2s; }
.qa-card:hover { border-color: var(--sc-lime-dark); background: var(--sc-surface-alt); }
.qa-icon { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.qa-icon.lime { background: rgba(182,255,0,0.12); }
.qa-icon.lime svg { stroke: var(--sc-lime); }
.qa-icon.purple { background: rgba(140,60,255,0.12); }
.qa-icon.purple svg { stroke: var(--sc-purple); }
.qa-icon.blue { background: rgba(20,155,255,0.12); }
.qa-icon.blue svg { stroke: var(--sc-blue); }
.qa-icon.gold { background: rgba(245,197,66,0.12); }
.qa-icon.gold svg { stroke: var(--sc-gold); }
.qa-icon svg { width: 22px; height: 22px; }
.qa-text h4 { font-size: 14px; font-weight: 600; color: var(--sc-text); margin: 0 0 2px; }
.qa-text p { font-size: 12px; color: var(--sc-text-muted); margin: 0; }

/* Dashboard content grid */
.content-grid { display: grid; grid-template-columns: 1fr 340px; gap: 24px; margin-bottom: 24px; }

/* Platforms section */
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.section-title-bar { display: flex; align-items: center; gap: 8px; }
.section-title-bar::before { content: ''; width: 3px; height: 18px; background: var(--sc-lime); border-radius: 2px; }
.section-title-bar h2 { font-size: 16px; font-weight: 700; color: var(--sc-text); text-transform: uppercase; letter-spacing: 0.5px; margin: 0; }
.section-manage { font-size: 12px; color: var(--sc-text-muted); text-decoration: none; display: flex; align-items: center; gap: 4px; }
.section-manage:hover { color: var(--sc-lime); }
.section-manage svg { width: 14px; height: 14px; }

.platform-scroll { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: none; }
.platform-scroll::-webkit-scrollbar { display: none; }
.platform-card { min-width: 260px; max-width: 280px; background: var(--sc-surface); border: 1px solid var(--sc-border); border-radius: var(--sc-card-radius); overflow: hidden; flex-shrink: 0; }
/* art-fills-card-20261005 -- was height:140px, which pinned the art to 140px wide in a 280px card
   for the same aspect-ratio reason as above. */
.platform-card-image { height: auto; width: 100%; position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.platform-card-image.purple-grad { background: linear-gradient(135deg, #1a0a30, #2d1060, #1a0a30); }
.platform-card-image.blue-grad { background: linear-gradient(135deg, #0a1a2e, #102a50, #0a1a2e); }
.platform-card-image.orange-grad { background: linear-gradient(135deg, #2e1a0a, #503010, #2e1a0a); }
.platform-card-image .game-title { font-size: 24px; font-weight: 800; color: var(--sc-text); text-shadow: 0 2px 8px rgba(0,0,0,0.5); text-transform: uppercase; text-align: center; line-height: 1.1; }
.platform-tag { position: absolute; top: 10px; left: 10px; padding: 4px 10px; border-radius: 6px; font-size: 11px; font-weight: 700; text-transform: uppercase; }
.platform-tag.hot { background: var(--sc-danger); color: #fff; }
.platform-tag.vip { background: var(--sc-purple); color: #fff; }
.platform-tag.trending { background: var(--sc-gold); color: #050807; }
.platform-card-body { padding: 12px 14px; }
.platform-status-row { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 12px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--sc-green); }
.status-dot.inactive { background: var(--sc-text-muted); }
.platform-status-label { font-weight: 600; color: var(--sc-text); }
.platform-last-played { color: var(--sc-text-muted); margin-left: auto; }
.platform-actions { display: flex; gap: 6px; }
.platform-action-btn { flex: 1; padding: 8px 4px; border-radius: 8px; font-size: 12px; font-weight: 600; cursor: pointer; border: 1px solid var(--sc-border); background: var(--sc-surface-alt); color: var(--sc-text-muted); display: flex; align-items: center; justify-content: center; gap: 4px; transition: all 0.2s; }
.platform-action-btn:hover { border-color: var(--sc-lime-dark); color: var(--sc-text); }
.platform-action-btn.launch { background: var(--sc-lime); border-color: var(--sc-lime); color: #050807; }
.platform-action-btn.launch:hover { background: #A0E600; }
.platform-action-btn svg { width: 14px; height: 14px; }
.carousel-controls { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 12px; }
.carousel-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--sc-border); border: none; cursor: pointer; padding: 0; }
.carousel-dot.active { background: var(--sc-lime); }
.carousel-arrow { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--sc-border); background: var(--sc-surface); cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--sc-text-muted); }
.carousel-arrow:hover { border-color: var(--sc-lime-dark); color: var(--sc-text); }
.carousel-arrow svg { width: 14px; height: 14px; }

/* Activity panel */
.activity-panel { background: var(--sc-surface); border: 1px solid var(--sc-border); border-radius: var(--sc-card-radius); padding: 20px; }
.activity-header { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.activity-header svg { width: 18px; height: 18px; stroke: var(--sc-lime); }
.activity-header h3 { font-size: 14px; font-weight: 700; color: var(--sc-text); text-transform: uppercase; letter-spacing: 0.5px; margin: 0; }
.activity-list { display: flex; flex-direction: column; gap: 4px; }
.activity-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.04); }
.activity-item:last-child { border-bottom: none; }
.activity-icon { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.activity-icon.deposit { background: rgba(57,211,83,0.15); }
.activity-icon.deposit svg { stroke: var(--sc-green); }
.activity-icon.referral { background: rgba(20,155,255,0.15); }
.activity-icon.referral svg { stroke: var(--sc-blue); }
.activity-icon.withdrawal { background: rgba(245,197,66,0.15); }
.activity-icon.withdrawal svg { stroke: var(--sc-gold); }
.activity-icon.bonus { background: rgba(140,60,255,0.15); }
.activity-icon.bonus svg { stroke: var(--sc-purple); }
.activity-icon.login { background: rgba(174,182,176,0.1); }
.activity-icon.login svg { stroke: var(--sc-text-muted); }
.activity-icon svg { width: 18px; height: 18px; }
.activity-info { flex: 1; }
.activity-info-title { font-size: 14px; font-weight: 500; color: var(--sc-text); }
.activity-info-time { font-size: 12px; color: var(--sc-text-muted); }
.activity-amount { font-size: 15px; font-weight: 600; white-space: nowrap; }
.activity-amount.positive { color: var(--sc-green); }
.activity-amount.negative { color: var(--sc-danger); }
.activity-amount.neutral { color: var(--sc-text-muted); }
.view-all-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 12px; border: 1px solid var(--sc-border); border-radius: var(--sc-button-radius); background: transparent; color: var(--sc-text); font-size: 14px; font-weight: 500; cursor: pointer; margin-top: 12px; transition: all 0.2s; }
.view-all-btn:hover { border-color: var(--sc-lime-dark); color: var(--sc-lime); }
.view-all-btn svg { width: 16px; height: 16px; }

/* Promo section */
.promo-scroll { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: none; }
.promo-scroll::-webkit-scrollbar { display: none; }
.promo-card { min-width: 280px; max-width: 320px; border-radius: var(--sc-card-radius); padding: 24px; flex-shrink: 0; position: relative; overflow: hidden; }
.promo-card.green { background: linear-gradient(135deg, #0a2a0e, #1a4a20); border: 1px solid rgba(182,255,0,0.2); }
.promo-card.purple { background: linear-gradient(135deg, #1a0a30, #2d1060); border: 1px solid rgba(140,60,255,0.2); }
.promo-card.gold { background: linear-gradient(135deg, #2a1a00, #4a3010); border: 1px solid rgba(245,197,66,0.2); }
.promo-tag { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--sc-lime); margin-bottom: 8px; }
.promo-title { font-size: 22px; font-weight: 800; color: var(--sc-text); margin-bottom: 4px; }
.promo-desc { font-size: 13px; color: var(--sc-text-muted); }

/* Portal content wrapper */
.portal-content { padding: 24px; flex: 1; }

/* Responsive for dashboard */
@media (max-width: 1200px) {
  .content-grid { grid-template-columns: 1fr; }
  .hero-wallet { flex-direction: column; }
  .hero-wallet-aside { width: 100%; flex-direction: row; }
}
@media (max-width: 768px) {
  .quick-actions-row { flex-direction: column; }
  .hero-wallet-aside { flex-direction: column; }
  .hero-btns { flex-direction: column; }
}

/* ============================================================
   DASHBOARD LAYOUT FIXES
   Corrects alias overrides that broke the original layout.
   Must remain at the very bottom of this file.
   ============================================================ */

/* Hero Wallet: side-by-side layout (main left, breakdown right) */
.hero-wallet {
  display: flex;
  flex-direction: row;
  padding: 0;
  gap: 0;
  min-height: 260px;
  background: var(--sc-surface);
  border: 1px solid var(--sc-border);
  border-radius: var(--sc-card-radius);
  overflow: hidden;
  margin-bottom: 24px;
  position: relative;
}
.hero-wallet::before {
  content: '';
  position: absolute;
  top: -50%;
  right: 20%;
  width: 50%;
  height: 200%;
  background: radial-gradient(circle, rgba(182,255,0,0.05) 0%, transparent 60%);
  pointer-events: none;
}

.hero-wallet-main {
  flex: 1;
  padding: 32px 36px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  z-index: 1;
  background:
    radial-gradient(ellipse at 70% 50%, rgba(182,255,0,0.06) 0%, transparent 60%),
    linear-gradient(135deg, var(--sc-surface) 0%, #0D150F 100%);
}

.hero-wallet-sidebar {
  width: 300px;
  flex-shrink: 0;
  background: var(--sc-surface-alt);
  border-left: 1px solid var(--sc-border);
  display: flex;
  flex-direction: column;
}

/* Quick Actions: ONE solid horizontal bar with dividers */
.quick-actions {
  display: flex;
  grid-template-columns: unset;
  gap: 0;
  background: var(--sc-surface);
  border: 1px solid var(--sc-border);
  border-radius: var(--sc-card-radius);
  overflow: hidden;
  margin-bottom: 24px;
}

.quick-action-tile {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 24px;
  background: transparent;
  border: none;
  border-right: 1px solid var(--sc-border);
  border-radius: 0;
  cursor: pointer;
  transition: background var(--sc-transition);
}
.quick-action-tile:last-child {
  border-right: none;
}
.quick-action-tile:hover {
  background: var(--sc-surface-alt);
  transform: none;
  border-color: var(--sc-border);
}

/* Content Grid: two columns at desktop */
.content-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  margin-bottom: 24px;
}

/* Platform carousel: horizontal row */
.platforms-track {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 16px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding-bottom: 4px;
}
.platforms-track::-webkit-scrollbar { display: none; }

/* Sidebar: ensure all nav items visible */
.sidebar .sidebar-nav {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

/* Sidebar VIP: don't push nav items off screen */
.sidebar .sidebar-vip {
  flex-shrink: 0;
}

/* Hide hamburger at desktop */
.sidebar-toggle {
  display: none;
}

/* Promo banners: keep visual styling */
.promo-banner {
  min-width: 280px;
  flex: 1;
  border-radius: var(--sc-card-radius);
  padding: 24px 28px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

/* ── Dashboard Responsive Fixes ── */
@media (min-width: 1025px) {
  .hero-wallet {
    flex-direction: row;
  }
  .content-grid {
    grid-template-columns: 1fr 340px;
  }
}

@media (max-width: 1024px) {
  .hero-wallet {
    flex-direction: column;
  }
  .hero-wallet-sidebar {
    width: 100%;
    flex-direction: row;
    border-left: none;
    border-top: 1px solid var(--sc-border);
  }
  .wallet-detail-item {
    border-bottom: none;
    border-right: 1px solid var(--sc-border);
  }
  .wallet-detail-item:last-of-type {
    border-right: none;
  }
  .content-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .sidebar-toggle {
    display: flex;
  }
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .main-content {
    margin-left: 0;
  }
  .quick-actions {
    flex-direction: column;
  }
  .quick-action-tile {
    border-right: none;
    border-bottom: 1px solid var(--sc-border);
  }
  .quick-action-tile:last-child {
    border-bottom: none;
  }
  .hero-wallet-sidebar {
    flex-direction: column;
  }
  .wallet-detail-item {
    border-right: none;
    border-bottom: 1px solid var(--sc-border);
  }
}

/* ============================================================
   MODAL OVERLAY & DIALOG
   ============================================================ */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.7);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}
.modal-overlay.open {
  display: flex;
}
.modal {
  background: var(--sc-card-bg, #1a1a1a);
  border: 1px solid var(--sc-border, #2a2a2a);
  border-radius: 16px;
  width: 90%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.modal-box {
  background: var(--sc-card-bg, #1a1a1a);
  border: 1px solid var(--sc-border, #2a2a2a);
  border-radius: 16px;
  width: 90%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--sc-border, #2a2a2a);
}
.modal-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--sc-text, #fff);
}
.modal-close {
  background: none;
  border: none;
  color: var(--sc-text-muted, #888);
  font-size: 22px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}
.modal-close:hover { color: var(--sc-text, #fff); }
.modal-body {
  padding: 20px;
}
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 20px;
  border-top: 1px solid var(--sc-border, #2a2a2a);
}

/* ── Platform Card Credentials ── */
.platform-card-credentials {
  padding: 8px 12px;
  border-bottom: 1px solid var(--sc-border, #1C2B20);
}
.credential-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  line-height: 1.8;
}
.credential-label {
  color: var(--sc-text-dim, #6B756D);
  font-weight: 400;
}
.credential-value {
  color: var(--sc-text, #F7F8F7);
  font-weight: 600;
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
}
.password-masked {
  display: flex;
  align-items: center;
  gap: 6px;
}
.pwd-toggle {
  background: none;
  border: none;
  color: var(--sc-text-dim, #6B756D);
  cursor: pointer;
  padding: 2px;
  line-height: 1;
  border-radius: 4px;
  transition: color 0.15s ease, background 0.15s ease;
}
.pwd-toggle:hover {
  color: var(--sc-text, #F7F8F7);
  background: var(--sc-surface-hover, #0A110E);
}

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

/* Account action buttons in platform cards */
.platform-card-account-actions {
  /* btn-left-align-20261005 -- horizontal padding REMOVED. The card body already pads 14px, so the
     old `8px 12px` pushed the buttons to 27px from the card edge while the name,
     balance and status text all sat at 15px. Vertical padding is kept. */
  padding: 8px 0;
  display: flex;
  gap: 8px;
  /* dash-account-actions-20261005 -- the card is max-width:280px with overflow:hidden, so a row that cannot
     fit gets SLICED rather than scrolled. Wrapping lets a long label take the
     width it needs and push its neighbour to the next line instead. */
  flex-wrap: wrap;
  row-gap: 8px;
  justify-content: flex-start;
}
.platform-card-account-actions .btn {
  /* WAS `flex: 1`, i.e. flex-basis 0, which forced both buttons into equal narrow
     halves whatever their labels said -- that is what truncated "Connect
     Existing". Sizing by content lets each button be as wide as its own text. */
  flex: 0 1 auto;
  min-width: 0;
  white-space: nowrap;
  font-size: 12px;
  padding: 6px 10px;
}


/* Copy buttons beside a player's platform username and password.
   the boss ruled out automatic platform login (streaming a browser per player
   costs about $6,900/month at 500 concurrent and cannot work for native apps
   at all), so copy-and-paste is the supported path and it should feel good. */
.credential-copy {
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 4px;
  margin-left: 6px;
  color: var(--text-dim, #8a8f98);
  vertical-align: middle;
  line-height: 1;
  border-radius: 3px;
  transition: color .15s ease, background .15s ease;
}
.credential-copy:hover { color: var(--text, #e8eaed); background: rgba(255,255,255,.08); }

/* copy-button-never-squeezed-20261005
   The copy control is the LAST child of a flex row inside a card with
   overflow:hidden, and it had no flex sizing -- so on the narrow dashboard card
   it was the thing that got compressed or clipped away, while the wider
   platforms-page card had room and kept it. Pin it to its natural width and let
   the value text shrink instead. */
.credential-copy { flex: 0 0 auto; }

/* credentials-stacked-dashboard-20261005
   DASHBOARD CARD ONLY (.platform-card, max-width 280px). The label sits on its
   own line, the value gets the full card width, and the view/copy controls drop
   underneath it. Inline, the controls and the value competed for ~150px and the
   password lost. The platforms-page card (.platform-card-full) is wider and
   keeps the inline layout. */
/* credentials-left-aligned-20261005 -- ONE LINE each, left aligned.
   The row was justify-content:space-between, which pinned the value to the right
   edge and left the copy icon nowhere to sit. Stacking the controls fixed that
   but made the card a third taller. Aligning everything left puts the label,
   value and icons on a single line with room to spare. */
.platform-card .credential-row {
  justify-content: flex-start;
  gap: 6px;
  flex-wrap: nowrap;
}
.platform-card .credential-label { flex: 0 0 auto; }
/* credentials-flush-left-20261005 -- the credentials block added 12px of its own horizontal padding on top of
   the card body's 15px, so these rows started at 27px while the name, balance,
   status and buttons all start at 15px. Measured at 390px that left the value
   just 156px of a 280px card. Flush left, and the label is trimmed a little so
   more of the width reaches the value and its icons. */
.platform-card .platform-card-credentials { padding-left: 0; padding-right: 0; }
/* credentials-smaller-text-20261005 -- smaller so the whole username/password fits on the narrow card.
   The value is monospace, which is wider per character than the label, so it
   gets the bigger reduction. */
/* credentials-smaller-text-2-20261005 -- down again, 11px was still cutting off. The label is trimmed hardest
   because it is plain text; the value is monospace and already tight. */
/* credentials-no-labels-20261005 -- the labels are GONE on this card. At 280px they consumed about a third
   of the row and the value was still being cut off at 10px. A masked value beside
   an eye icon needs no caption, and the other row is obviously the username. With
   the whole width available the text goes back up to 11px and stays readable. */
.platform-card .credential-label { display: none; }
.platform-card .credential-row { font-size: 11px; }
.platform-card .credential-value,
.platform-card .password-masked,
.platform-card .pwd-text { font-size: 11px; letter-spacing: -0.2px; }

/* Trim the icons too -- every pixel they give back goes to the value. */
.platform-card .credential-copy { padding: 1px 2px; margin-left: 2px; }
.platform-card .credential-copy svg { width: 11px; height: 11px; }
.platform-card .pwd-toggle { padding: 1px; }
.platform-card .pwd-toggle svg { width: 12px; height: 12px; }
.platform-card .credential-row { gap: 6px; }
.platform-card .credential-value {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.platform-card .password-masked {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}
.platform-card .credential-copy,
.platform-card .pwd-toggle { flex: 0 0 auto; margin-left: 0; }
.credential-row { gap: 8px; }
.credential-value { min-width: 0; }
.password-masked { min-width: 0; }
.password-masked .pwd-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.credential-copy:focus-visible { outline: 2px solid var(--accent, #4a9eff); outline-offset: 1px; }
.credential-copy.copied { color: #3fb950; }


/* header-brand-mobile
   The operator's logo is written into .sidebar-logo-icon, which on a phone lives
   behind the hamburger -- so the brand was invisible until the menu was opened.
   portal.js injects .header-brand into .header-bar on every portal page; this rule
   reveals it ONLY where the sidebar is hidden. On desktop the sidebar is on screen
   and showing it here as well would render the same logo twice.
   768px matches the breakpoint the hero and sidebar already use -- not a new one. */
.header-brand { display: none; }
@media (max-width: 768px) {
  .header-brand {
    /* SIZED INTO DEAD SPACE, NOT INTO OTHER CONTROLS.
       .header-bar is a FIXED height (--sc-topbar-height, 72px), so nothing below
       reflows no matter how tall this gets -- the only risk is overflowing the bar
       itself. The tallest siblings are the hamburger and bell at 40px, so 48px is
       both larger than every control and still 12px clear of the bar top and bottom.

       WIDTH is the real hazard, not height. On a 320px phone the bar has 288px of
       inner width, of which the hamburger and the bell/avatar/chevron group already
       take ~148px. A fixed max-width would push those off the right edge on the
       smallest screens, so the cap is relative (45vw) and the image is allowed to
       shrink inside it rather than force the row wider. */
    display: flex; align-items: center; min-width: 0; margin-left: 10px; gap: 8px;
    flex: 0 1 auto; max-width: 45vw;
    font-weight: 800; font-size: 17px; letter-spacing: 0.5px;
    color: var(--sc-text); text-transform: uppercase;
    overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  }
  .header-brand img {
    max-height: 48px; max-width: 100%; width: auto; height: auto; display: block;
    object-fit: contain;
  }
}


/* ══════════════════════════════════════════════════════════
   MOBILE FIXES — 2026-09-29
   Found by walking every portal page SIGNED IN at 390x844 and 360x780.
   These sit at the very bottom deliberately: two of them override rules
   that appear earlier in this file, and one overrides an INLINE style.
   (The "must remain at the very bottom" note on the DASHBOARD LAYOUT
   FIXES block at ~line 3013 is already stale — .platform-card-account-actions,
   .credential-copy and .header-brand were all appended after it.)
   ══════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  /* ── 1. Table state rows were being written off the right edge ──
     .table-wrap scrolls internally (overflow-x:auto above) and the tables are
     genuinely wider than a phone — measured signed in at 390px: wallet's three
     tables are 445 / 465 / 503px inside a 356px box, transactions' is 588px.
     That part is by design and is left alone.
     What is NOT by design: portal.js writes every state row with an INLINE
     text-align:center (portal.js:1403/1407/1412, 1441/1445/1450, 1709,
     1958/2013/2016, 3576/3583/3590; plus the static "Loading..." rows in
     wallet.html, transactions.html and affiliates.html). Centring on a 588px
     table inside a 356px window puts the message ~120px past the right edge, so
     the player sees an apparently empty box. "No transactions found" and
     "No activity yet" were both off screen at 390 and at 360.
     portal.js is not this file's to change and an inline style yields only to
     !important, so the override is scoped as tightly as it can be: cells that
     span columns, on phones only. Every colspan cell in this portal is a
     state / loading / error row — enumerated, not sampled: 20 in portal.js and
     8 in the page HTML, no data cell among them. */
  .table-wrap td[colspan] { text-align: left !important; }

  /* ── 2. A horizontal scroller with no affordance reads as broken ──
     Nothing on screen said those tables scroll. Overlay scrollbars stay hidden
     until a drag starts, so the player had no reason to try. Forcing a thin
     persistent bar is the smallest honest signal. */
  .table-wrap {
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(182,255,0,0.35) rgba(255,255,255,0.05);
  }
  .table-wrap::-webkit-scrollbar { height: 6px; -webkit-appearance: none; }
  .table-wrap::-webkit-scrollbar-track { background: rgba(255,255,255,0.05); border-radius: 3px; }
  .table-wrap::-webkit-scrollbar-thumb { background: rgba(182,255,0,0.35); border-radius: 3px; }

  /* ── 3. Tap targets under the 44px minimum ──
     Measured signed in at 390: .btn-sm rendered 29-32px tall across the
     dashboard, platforms, promotions and help; the hamburger 40x40; the
     notification bell 36x39 (it carries an inline padding:8px, which min-height
     does not fight — min-* is absent from that inline style, so no !important
     is needed). Height only: widths are already fine and forcing them would
     reflow rows that currently fit.
     NOT changed here: the five notification checkboxes on settings.html render
     18x18. Enlarging a checkbox changes how the control looks, not just how big
     it is, so that is flagged for Travis rather than decided here. */
  .btn, .btn-sm { min-height: 44px; }
  .mobile-menu-btn,
  .sidebar-toggle,
  .sidebar-close,
  .topbar-bell,
  #portalNotifToggle,
  .credential-copy,
  .pwd-toggle { min-width: 44px; min-height: 44px; }
  /* portal-qa-sweep-20261005 (touch-targets): .credential-copy and .pwd-toggle on My
     Platforms measured 14-17px, under the 44px minimum this rule already
     enforces for every other control -- missed by the 2026-09-29 pass.
     Folded into the existing rule rather than a second one. */
  /* transactions.html's type filters are .filter-pill, not .btn -- measured 34px
     tall, so the .btn rule above never reached them. */
  .filter-pill { min-height: 44px; }
}

/* ══════════════════════════════════════════════════════════
   MOBILE FIXES ROUND 2 — 2026-10-01
   Found by walking every portal page SIGNED IN at 390x844 and 360x780 as a
   throwaway player. Appended at the very bottom on purpose: every rule here
   overrides something earlier in this file, and two override an INLINE style
   written by portal.js (which this lane does not own).
   ══════════════════════════════════════════════════════════ */

@media (max-width: 768px) {

  /* ── 1. iOS Safari zooms the whole page whenever a field under 16px is tapped ──
     This is the defect a Chromium harness can never see: Chromium does not
     auto-zoom, so a measurement pass reports these fields as fine. On iOS the page
     jumps on focus and stays zoomed and scrolled sideways after the keyboard
     closes -- which is what "still not right" looks like on a phone. 16px is the
     exact threshold; it is not a comfort setting.

     WHY THIS IS ONE BLANKET RULE AND NOT A LIST OF IDS.
     The first version of this block was a plain rule on the known classes plus an
     !important list of four ids that carried font-size inline. It left ELEVEN
     controls still zooming, including #modalLoginId and #modalLoginPass -- the
     login modal, the first screen every guest sees. An id list fails OPEN: the
     next person to add a field is not protected and has no way to know this list
     exists, which is precisely how those eleven were missed.
     So the rule is inverted. It covers every text-entry control and subtracts the
     input types that cannot trigger the zoom. That exclusion list is over HTML
     input TYPES -- a closed set fixed by the spec -- not over a set that grows
     every time someone adds a field to this portal. A field added tomorrow is
     covered by default, inline style or not.

     WHY !important IS REQUIRED, in two independent places:
       - inline font-size written into the markup and by portal.js
         (index.html:920 and :924 on #modalLoginId/#modalLoginPass; portal.js on
         #platformSearch, #connectExistingUser, #connectExistingBalance, #acAmount).
         No plain rule of any specificity beats an inline style.
       - login.html:203 and register.html:208 each define their OWN
         .form-input { font-size:14px } in a page <style> block that comes AFTER
         the <link> to this file, so at equal specificity source order wins and a
         plain rule here loses on those two pages.
     Checkboxes and radios are excluded because they do not trigger the zoom, and
     growing them changes how the control looks rather than how big it is -- that
     is still Travis's call, not this lane's. */
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="image"]):not([type="hidden"]),
  select,
  textarea { font-size: 16px !important; }

  /* ── 2. The hamburger menu was clipping its own navigation ──
     portal.css:3124 makes .sidebar-nav the flex item that absorbs free space
     (flex:1; overflow-y:auto; min-height:0) and portal.css:3131 pins the VIP card
     below it. On a desktop column that is right. On a phone the nav's content is
     545px and the box it was given is 520px at 390x844, 456px at 360x780 and
     316px at 360x640 -- so "Sign Out" was cut at 390, "Settings" AND "Sign Out"
     were both gone at 360x780, and five of ten items were gone on a 640-tall
     phone. It technically scrolled, but as an inner scroller with a half-row at
     the boundary and no scrollbar, which reads as the end of the list.
     The drawer is now one scrolling column: the nav takes its natural height and
     the VIP card flows after it. margin-top:auto (portal.css:263) is pinned to 0
     so the card cannot be pushed back down into the clipped position on a tall
     phone where free space goes positive again. */
  .sidebar .sidebar-nav,
  .portal-sidebar .sidebar-nav {
    flex: 0 0 auto;
    overflow-y: visible;
  }
  .sidebar .sidebar-vip,
  .portal-sidebar .sidebar-vip { margin-top: 0; }
  .sidebar, .portal-sidebar { overflow-y: auto; -webkit-overflow-scrolling: touch; }

  /* ── 3. The drawer's close button was drawn on top of the brand name ──
     .sidebar-close is position:absolute top/right 16px (portal.css:1481) and the
     previous pass grew it to a 44px minimum, which pushed its left edge from 226
     to 214 -- into .brand-name, which ends at 242. Measured 28px of overlap; the
     X is visibly drawn over the last letters of the operator's name.
     The button keeps its 44px target and the row re-flows around it.
     Reserving room on the same line does not work: the logo image is 86px wide,
     the name needs 130px and the button needs 44px plus a gap -- 274px of row
     cannot hold 270px of content and keep them apart. Shrinking the text instead
     truncated the operator's own name to "SIMPLY SLA...", which is a worse defect
     than the one being fixed. So the row wraps: image on the first line beside the
     button, name on the second line with the full width. padding-right keeps the
     button's column clear on BOTH lines, and no operator's logo is resized. */
  .sidebar-logo { flex-wrap: wrap; padding-right: 60px; }
  .sidebar-logo-text { min-width: 0; }

  /* ── 4. Platform cards were 280px wide in a 358px column ──
     .platform-card's min-width:260/max-width:280 (portal.css:961-968) exists for
     the dashboard's horizontal .platforms-track carousel, where a fixed card
     width is the point. platforms.html reuses the same class inside .platform-grid,
     which is already grid-template-columns:1fr on a phone (portal.css:2787), so the
     cap left a dead strip down the right of the page: 78px at 390, 64px at 360,
     on all 23 cards. Scoped to the GRID only -- the carousel keeps its fixed
     cards, which is why this is a child selector and not a bare .platform-card.
     The 480px cap and the auto margins are for the TOP of this band, not the
     phones: .platform-grid is already one column at 768px (portal.css:2787), and
     letting the card fill it there gives a 736px square of artwork and a 946px
     card -- one card per screenful. Capped and centred it is a 480px card with
     even margins, which reads as a layout rather than as a card that fell to one
     side. Every portrait phone column (358px at 390, 328px at 360) is under the
     cap, so on the devices this was reported from the cap never applies. */
  .platform-grid > .platform-card {
    min-width: 0;
    max-width: 480px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
  }

  /* ── 5. Platform artwork was a 140px square inside the card ──
     portal.css:977 sets height:auto + aspect-ratio:1/1 and its comment records
     Travis's 2026-09-17 ruling ("A PERFECT SQUARE at every width") and even warns
     that "an explicit height beats aspect-ratio". portal.css:2929 then sets
     height:140px on the same selector, later in the file and at equal specificity,
     and wins. The comment describes an intent the code does not deliver; the code
     wins and this says so. Result on a phone: a 140px square of art with 140px of
     dead black beside it in every card.
     Restored for the grid only. The dashboard carousel is defeated by the same
     140px rule and is NOT changed here -- that surface was not reported and
     changing it is Travis's call, not this lane's. Flagged in the report. */
  .platform-grid > .platform-card > .platform-card-image {
    height: auto;
    aspect-ratio: 1 / 1;
  }

  /* ── 6. "Connect Existing" was clipped on every card ──
     .platform-card-account-actions (portal.css:3341) is padding:8px 12px with
     gap:8px and two flex:1 buttons; measured content 256px in a 250px box, so 6px
     was sliced off the right of the second button on all 23 cards. On the
     dashboard at 360 the same pair clips the LABEL: content 96px in a 93px box,
     "Connect Existing" cut mid-word. min-width:0 lets a flex item shrink below its
     content width, which is what flex:1 alone does not do. */
  .platform-card-account-actions { flex-wrap: wrap; }
  .platform-card-account-actions .btn {
    min-width: 0;
    flex: 1 1 calc(50% - 4px);
    white-space: normal;
  }

  /* ── 7. Affiliates: the Copy button was cut off at the card edge ──
     .referral-link-box (portal.css:2674) is a flex row with no wrap; measured
     content 308px in a 278px box at 360, and the Copy button's right rounded
     corner is visibly sliced flat against the card. The button is the supported
     way to take the link -- the input is readonly and 544px of text in a 209px
     box shows the player "https://simplyslayin." and nothing more -- so losing it
     off the edge removes the only working action on the page.
     Stacked: the field on one line, the button full width under it. */
  .referral-link-box { flex-wrap: wrap; }
  .referral-link-box input { flex: 1 1 100%; min-width: 0; }
  .referral-link-box .copy-btn { flex: 1 1 100%; justify-content: center; }

  /* ── 8. Hero and section links were under the 44px tap minimum ──
     The previous pass set .btn,.btn-sm{min-height:44px}. .hero-btn is neither:
     portal.css:2868 gives it padding:10px 20px at font-size:14px, measured 40px
     tall for Add Funds, Withdraw, Claim Bonus and Referral at both widths.
     .section-link (portal.css:917) measured 39px for "See All Promotions" and
     20px for wallet's "View All". Height only -- widths already fit, and forcing
     them would reflow rows that currently do not overflow. */
  .hero-btn { min-height: 44px; }
  .section-link { min-height: 44px; align-items: center; }

  /* ── 9. A section header with a button crammed against a wrapped title ──
     transactions.html's .section-header puts "Transaction History" and Export CSV
     in one row; at 360 the title wraps to two lines while the button stays beside
     the first, so neither lines up with the accent bar. Wrap rather than force a
     column: .section-header is shared with wallet and the dashboard, where the row
     still fits and must keep fitting. */
  .section-header { flex-wrap: wrap; row-gap: 12px; }

  /* ── 10. The table scroll affordance does not reach the partner's phone ──
     The previous pass added scrollbar-width:thin and ::-webkit-scrollbar rules on
     .table-wrap (portal.css:3426). iOS Safari supports neither for a touch overflow
     scroller -- it draws overlay scrollbars that appear only during a drag and
     ignores both -- so on the phone this was reported from, the transactions table
     (588px of content in a 326px window) still had nothing on screen saying it
     scrolls. A right-edge fade does not depend on a scrollbar existing.
     Two layer pairs: the "cover" pair is attachment:local so it travels WITH the
     content and parks over each edge once that edge is reached; the "shadow" pair
     is attachment:scroll so it stays pinned to the box. Where a cover sits on top
     of a shadow the shadow is hidden -- so the glow appears only on the side that
     still has content off screen, and vanishes when the player reaches the end.
     Nothing moves and no cell is covered.
     The cover colour is var(--sc-surface): every .table-wrap in this portal sits
     directly inside a .card, and .card is background:var(--sc-surface)
     (portal.css:1957) -- checked on all six wrappers across transactions, wallet
     and affiliates, enumerated rather than sampled. --sc-surface is also one of the
     variables that does NOT differ between the master template and this site, so
     the same text is correct in both files.
     The glow is the brand lime at low alpha, not black: these cards are #0A110E,
     and a black-on-near-black fade is an affordance nobody can see, which is the
     same mistake as having none. It matches the scrollbar thumb the previous pass
     chose, rgba(182,255,0,0.35). */
  .table-wrap {
    background-image: linear-gradient(to right, var(--sc-surface) 40%, rgba(10,17,14,0)),
                      linear-gradient(to left,  var(--sc-surface) 40%, rgba(10,17,14,0)),
                      linear-gradient(to right, rgba(182,255,0,0.30), rgba(182,255,0,0)),
                      linear-gradient(to left,  rgba(182,255,0,0.30), rgba(182,255,0,0));
    background-position: left center, right center, left center, right center;
    background-repeat: no-repeat;
    background-size: 32px 100%, 32px 100%, 16px 100%, 16px 100%;
    background-attachment: local, local, scroll, scroll;
  }
}


/* ============================================================
   MONEY-ACTION TOASTS
   ------------------------------------------------------------
   showToast() in portal.js has built .toast-container / .toast since this
   portal existed, and NOTHING HAS EVER STYLED THEM on a player page. The only
   stylesheet in the tree that defines .toast is admin/assets/css/admin.css,
   which no portal page loads: platforms.html, wallet.html and the rest load
   portal.css and have no <style> block at all. Measured on the live site with
   the CSSOM rather than with grep -- zero rules across every loaded sheet match
   .toast, the container computed position:static, the toast computed
   background-color rgba(0,0,0,0) and 0px padding, and on a 390x844 viewport it
   landed 2400px down the document, below the fold.

   So "900 credits loaded to Simply Slayin", "Account created", and every
   money-failure message was delivered as a line of unstyled body text at the
   bottom of a scrolled page, which then deleted itself after four seconds.
   That is the completion signal for three of the four money actions.

   Same defect class as the .login-modal-overlay trap already recorded for this
   portal: markup built in JS against classes that live in a stylesheet the page
   does not load.

   z-index is above .modal-overlay (9999) on purpose. The outcome of a money
   movement is the one thing allowed to sit over everything else.
   ============================================================ */
.toast-container {
  position: fixed;
  top: calc(var(--sc-topbar-height) + 16px);
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 16px;
  background: var(--sc-surface);
  border: 1px solid var(--sc-border);
  border-left: 3px solid var(--sc-text-muted);
  border-radius: var(--sc-button-radius);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
  font-size: 13px;
  line-height: 1.5;
  color: var(--sc-text);
  min-width: 260px;
  max-width: 380px;
  pointer-events: auto;
  animation: nlToastIn 0.25s ease;
}

.toast svg { width: 18px; height: 18px; flex: 0 0 18px; margin-top: 1px; }
.toast span { flex: 1 1 auto; }

.toast.success { border-left-color: var(--sc-lime);   }
.toast.success svg { color: var(--sc-lime);   }
.toast.error   { border-left-color: var(--sc-danger); }
.toast.error   svg { color: var(--sc-danger); }
.toast.warning { border-left-color: var(--sc-gold);   }
.toast.warning svg { color: var(--sc-gold);   }
.toast.info    { border-left-color: var(--sc-blue);   }
.toast.info    svg { color: var(--sc-blue);   }

/* A sticky toast has no timer, so it needs a visible way out. The whole toast
   is clickable too -- see showToast() -- because this is read on a phone. */
.toast-sticky { font-weight: 500; }
.toast-dismiss {
  flex: 0 0 auto;
  background: none;
  border: 0;
  padding: 0 2px;
  margin-left: 4px;
  font-size: 18px;
  line-height: 1;
  color: var(--sc-text-dim);
  cursor: pointer;
  font-family: inherit;
}
.toast-dismiss:hover { color: var(--sc-text); }

.toast.removing { opacity: 0; transform: translateX(12px); transition: opacity 0.3s ease, transform 0.3s ease; }

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

/* On a phone the top-right corner is where the header lives and where a thumb
   never goes. Anchor to the bottom instead, full width inside the 16px gutter,
   clear of the home indicator. */
@media (max-width: 768px) {
  .toast-container {
    top: auto;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    left: 16px;
    right: 16px;
  }
  .toast { min-width: 0; max-width: none; }
  @keyframes nlToastIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
  }
}

/* hero-buttons-two-per-row-20261005 -- Add Funds / Withdraw / Claim Bonus / Referral, two per row on a phone.
   They were stretching the full width and reading as four long bars. A 2-up grid
   halves their length and squares them off. Desktop is untouched. */
@media (max-width: 640px) {
  /* hero-buttons-smaller-20261005 -- SMALLER, not stretched. Each button is sized to its own label and they
     wrap, so two land on a row because they are short. The previous version used
     a 2-up grid with width:100%, which made each one half the screen wide and
     centred the text -- bigger, not smaller. */
  .hero-btns {
    display: flex;
    /* hero-buttons-row-20261005 -- THE missing line. portal.css:3044 sets flex-direction:column in a
       mobile media query, so the buttons stacked 4 high no matter what
       flex-wrap said: a column wraps into more columns, not into rows. */
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-start;
    width: 100%;
  }
  .hero-btns .hero-btn {
    /* hero-buttons-two-left-20261005 -- half the row each, so exactly TWO per row. Content sizing let three
       fit. The label stays LEFT aligned inside the button, which was the actual
       objection to the earlier version, not the width. */
    /* hero-buttons-gap-fix-20261005 -- basis sized for a 10px gap, not 8px. index.html's inline style
       sets gap:10px and wins on source order, so calc(50% - 4px) overflowed the
       row by exactly 2px and every button wrapped onto its own line. */
    flex: 0 0 calc(50% - 7px);
    width: auto;
    min-width: 0;
    justify-content: flex-start;
    text-align: left;
    font-size: 12px;
    padding: 8px 10px;
    gap: 6px;
    white-space: nowrap;
    overflow: hidden;
  }
  .hero-btns .hero-btn svg { flex: 0 0 auto; width: 14px; height: 14px; }
}

/* hero-buttons-gap-fix-20261005 -- pin the gap here too, with enough specificity to beat index.html's
   inline `.hero-btns { gap: 10px }`, so the basis above and the actual gap can
   never drift apart again. */
@media (max-width: 640px) {
  .hero-btns-below .hero-btns, .portal-content .hero-btns { gap: 8px; }
}

/* hero-electric-moved-to-stylesheet-20261005 -- moved here from index.html's inline <style>,
   which has no cache-control header and was being served stale. */
  @property --heroRingAngle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
  }
  .hero-panel { position: relative; }
  /* hero-ring-masked-20261005 -- drawn ON TOP and masked to just the rim.
     The first version used inset:-2px with z-index:-1, which is the classic
     way to lose a gradient border: a negative-index pseudo-element sinks
     behind an ancestor's opaque background and never paints. Masking the
     middle out instead means it sits above the artwork and depends on no
     stacking context at all. */
  .hero-panel::before {
    content: "";
    position: absolute;
    /* hero-electric-outside-20261005 -- OUTSIDE the artwork. inset:0 drew the rim over the top 3px of
       the image; a negative inset pushes the ring's box beyond the panel so
       the band sits entirely outside it and covers nothing. */
    inset: -3px;
    z-index: 3;
    pointer-events: none;
    border-radius: inherit;
    padding: 3px;
    /* hero-current-20261005 -- ONE current, not three arcs.
       The previous build had three bright segments in this gradient at once,
       which reads as ornament rather than charge. There is one head now, at
       0deg, trailing a ~100deg tail that fades to nothing. The tail is the
       part that makes it look like current with a direction: a bare bright
       dot travelling a circle reads as a dot travelling a circle.
       The faint base colour at the end keeps the rest of the rim from going
       fully black between passes, so the border still exists when the head is
       on the far side. */
    /* hero-lightning-20261005 -- demoted to a FLAT faint rim with no animation. The bolt is the
       animated element now; two animated borders on the same edge fight each
       other. This exists only so the panel always has a visible edge. */
    background: rgba(150,230,255,0.16);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    mask-composite: exclude;
    /* hero-lightning-20261005 -- no animation: see the rim note above. */
  }
  /* One continuous lap of the perimeter. */
  @keyframes heroArcRun { to { --heroRingAngle: 360deg; } }

  /* THE EVENTUAL ARC. Quiet for the first 85% of a 7s cycle -- just the current
     running at a steady modest glow -- then two hard strikes about 140ms apart
     and back to quiet. The strike only ever RAISES brightness; the previous
     version dropped opacity as low as 0.45 nine times a cycle, which is what
     made it read as a strobe instead of an arc. Opacity is left alone entirely. */
  @keyframes heroArcStrike {
    0%, 85% { filter: drop-shadow(0 0 3px rgba(130,230,255,0.55)); }
    87%     { filter: drop-shadow(0 0 9px rgba(230,255,255,1))
                      drop-shadow(0 0 20px rgba(130,210,255,0.7)); }
    89%     { filter: drop-shadow(0 0 2px rgba(130,230,255,0.4)); }
    91%     { filter: drop-shadow(0 0 12px rgba(255,255,255,1))
                      drop-shadow(0 0 26px rgba(150,220,255,0.75)); }
    94%     { filter: drop-shadow(0 0 3px rgba(130,230,255,0.5)); }
    100%    { filter: drop-shadow(0 0 3px rgba(130,230,255,0.55)); }
  }

  /* A player who has asked their device for less motion gets the ring, still. */
  @media (prefers-reduced-motion: reduce) {
    .hero-panel::before { animation: none; }
  }


/* ===== hero-lightning-20261005 : the lightning bolt =====
   Sits above the artwork and outside the panel edge. .hero-panel's
   overflow:hidden was removed (hero-unclip-20261005) so the spurs and the glow
   are no longer clipped away -- with the clip still in place NONE of this would
   be visible, which was the original bug. */
.hero-bolt {
  position: absolute;
  inset: -6px;
  z-index: 4;
  pointer-events: none;
  overflow: visible;
}
/* Shared: non-scaling-stroke is load-bearing. preserveAspectRatio="none" scales
   the path by very different factors on each axis (a 1000x300 viewBox into a
   ~1100x260 desktop panel, or a 342x342 phone panel), and without this the
   stroke would be stretched by the same amounts and read as a smear. */
.hero-bolt path {
  fill: none;
  vector-effect: non-scaling-stroke;
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* The always-on filament. Faint on purpose: it is the wire, not the strike. */
.hero-bolt-main {
  stroke: rgba(150,235,255,0.30);
  stroke-width: 1.1;
}
/* The travelling charge. Same path as the filament, so it follows every kink.
   dasharray 70/930 against pathLength=1000 means 7 percent of the perimeter is
   lit at a time; dashoffset running to -1000 is exactly one lap. */
.hero-bolt-head {
  stroke: #eaffff;
  stroke-width: 2.1;
  stroke-dasharray: 70 930;
  filter: drop-shadow(0 0 3px rgba(130,230,255,0.95))
          drop-shadow(0 0 8px rgba(110,200,255,0.5));
  animation: heroBoltRun 2.4s linear infinite,
             heroBoltStrike 7s linear infinite;
}
@keyframes heroBoltRun {
  from { stroke-dashoffset: 0; }
  to   { stroke-dashoffset: -1000; }
}
/* THE EVENTUAL STRIKE. Quiet for 86 percent of a 7s cycle, then two hard hits
   about 100ms apart. Brightness only goes UP -- an earlier build dropped
   opacity nine times a cycle and read as a strobe rather than a storm. */
@keyframes heroBoltStrike {
  0%, 86% { stroke-width: 2.1; stroke: #eaffff;
            filter: drop-shadow(0 0 3px rgba(130,230,255,0.95))
                    drop-shadow(0 0 8px rgba(110,200,255,0.5)); }
  87%     { stroke-width: 3.4; stroke: #ffffff;
            filter: drop-shadow(0 0 7px rgba(225,255,255,1))
                    drop-shadow(0 0 18px rgba(130,210,255,0.8)); }
  88.5%   { stroke-width: 2.1; stroke: #eaffff;
            filter: drop-shadow(0 0 2px rgba(130,230,255,0.6)); }
  90%     { stroke-width: 3.8; stroke: #ffffff;
            filter: drop-shadow(0 0 9px rgba(255,255,255,1))
                    drop-shadow(0 0 24px rgba(150,220,255,0.85)); }
  92.5%   { stroke-width: 2.1; stroke: #eaffff;
            filter: drop-shadow(0 0 3px rgba(130,230,255,0.8)); }
  100%    { stroke-width: 2.1; stroke: #eaffff;
            filter: drop-shadow(0 0 3px rgba(130,230,255,0.95))
                    drop-shadow(0 0 8px rgba(110,200,255,0.5)); }
}
/* The forks. Hidden except during the strike, and on the SAME 7s clock so they
   land on the same frames as the two hits. A bolt that forks is the single
   clearest read of "lightning" rather than "glowing edge". */
.hero-bolt-fork {
  stroke: #ffffff;
  stroke-width: 1.8;
  opacity: 0;
  filter: drop-shadow(0 0 6px rgba(190,245,255,0.95));
  animation: heroBoltFork 7s linear infinite;
}
@keyframes heroBoltFork {
  0%, 86.4% { opacity: 0; }
  87%       { opacity: 1; }
  88.4%     { opacity: 0; }
  90%       { opacity: 1; }
  91.6%     { opacity: 0; }
  100%      { opacity: 0; }
}
/* Reduced motion: the bolt stays drawn, nothing moves or flashes. */
@media (prefers-reduced-motion: reduce) {
  .hero-bolt-head, .hero-bolt-fork { animation: none; }
  .hero-bolt-fork { opacity: 0; }
}


/* ===== hero-animated-border-off-20261005 =====
   Animated hero border disabled on Travis's call. The markup and the rules above
   are left in place so a chosen treatment can be switched back on with one edit
   instead of being rebuilt. The panel's own 1px border is the border again. */
.hero-bolt { display: none; }   /* retired -- replaced by .hero-marquee */
.hero-panel::before { display: none; }


/* ===== hero-marquee-20261005 : casino marquee chase bulbs =====
   Tuning lives in these four custom properties and nowhere else. */
.hero-marquee {
  --hm-gap: 24px;          /* centre-to-centre spacing */
  --hm-r: 2.7px;           /* bulb radius */
  --hm-lit: #fff3cf;       /* warm white, matches the artwork's gold */
  --hm-dim: rgba(255,196,96,0.30);
  --hm-cycle: 1.35s;       /* one full A -> B -> C chase */
  position: absolute;
  inset: -8px;
  z-index: 4;
  pointer-events: none;
}
.hm-edge { position: absolute; display: block; }
/* Edges stop short of the corners so the rounded corner is covered by its own
   bulb instead of by a row running straight off the end of the curve. */
/* hero-marquee-tuned-20261005 -- 26px, not 20px. Measured: at 20px the first straight bulb sat
   15.3px from the corner bulb against a 24px standard gap, which bunched
   visibly at every corner. 26px puts it at 20.9px and the run reads even. */
.hm-top    { left: 26px; right: 26px; top: 0;    height: 8px; }
.hm-bottom { left: 26px; right: 26px; bottom: 0; height: 8px; }
.hm-left   { top: 26px; bottom: 26px; left: 0;   width: 8px; }
.hm-right  { top: 26px; bottom: 26px; right: 0;  width: 8px; }

.hm-edge i { position: absolute; inset: 0; display: block; opacity: 1; }

/* Horizontal edges: one bulb per --hm-gap of width, repeating across however
   wide the panel happens to be. */
.hm-top i, .hm-bottom i {
  background-image: radial-gradient(circle at 4px 4px,
    var(--hm-lit) 0 var(--hm-r), transparent calc(var(--hm-r) + 0.6px));
  background-size: calc(var(--hm-gap) * 3) 8px;
  background-repeat: repeat-x;
}
.hm-left i, .hm-right i {
  background-image: radial-gradient(circle at 4px 4px,
    var(--hm-lit) 0 var(--hm-r), transparent calc(var(--hm-r) + 0.6px));
  background-size: 8px calc(var(--hm-gap) * 3);
  background-repeat: repeat-y;
}
/* The interleave. Three layers a gap apart read as one evenly spaced run. */
.hm-top i:nth-child(1), .hm-bottom i:nth-child(3) { background-position-x: 0; }
.hm-top i:nth-child(2), .hm-bottom i:nth-child(2) { background-position-x: var(--hm-gap); }
.hm-top i:nth-child(3), .hm-bottom i:nth-child(1) { background-position-x: calc(var(--hm-gap) * 2); }
.hm-right i:nth-child(1), .hm-left i:nth-child(3) { background-position-y: 0; }
.hm-right i:nth-child(2), .hm-left i:nth-child(2) { background-position-y: var(--hm-gap); }
.hm-right i:nth-child(3), .hm-left i:nth-child(1) { background-position-y: calc(var(--hm-gap) * 2); }

/* The chase. steps(1) because a marquee bulb is on or off, never fading. */
.hm-edge i, .hm-corner {
  animation: hmChase var(--hm-cycle) steps(1, end) infinite;
  filter: drop-shadow(0 0 4px rgba(255,186,74,0.85))
          drop-shadow(0 0 9px rgba(255,150,40,0.35));
}
.hm-edge i:nth-child(2) { animation-delay: calc(var(--hm-cycle) / 3); }
.hm-edge i:nth-child(3) { animation-delay: calc(var(--hm-cycle) / 3 * 2); }
@keyframes hmChase {
  0%, 33.33%   { opacity: 1; }
  33.34%, 100% { opacity: 0.26; }
}

/* One bulb per corner, so the run does not simply stop at each curve. */
.hm-corner {
  position: absolute;
  width: calc(var(--hm-r) * 2);
  height: calc(var(--hm-r) * 2);
  border-radius: 50%;
  background: var(--hm-lit);
}
/* hero-marquee-tuned-20261005 -- 7.2px, derived not guessed. The corner is a 16px radius ARC, so
   matching the 4px clearance the straight bulbs have means sitting (r+4) from
   the arc's centre along 45deg: 16 - 20/sqrt(2) = 1.86px inward from the corner
   point, which is 8 + 1.86 - 2.7 = 7.2px in this box. At the previous 5px the
   bulb sat on the corner point itself, ~5px nearer the panel than every other
   bulb, and read as a dot floating loose off each corner.
   Delays run 0, 1/3, 2/3, 0 clockwise from top-left. Four corners cannot divide
   evenly into a three-phase chase; bottom-left rejoining at 0 is the closest
   the pattern allows and is invisible at this size. */
.hm-c1 { top: 7.2px;    left: 7.2px; }
.hm-c2 { top: 7.2px;    right: 7.2px;  animation-delay: calc(var(--hm-cycle) / 3); }
.hm-c3 { bottom: 7.2px; right: 7.2px;  animation-delay: calc(var(--hm-cycle) / 3 * 2); }
.hm-c4 { bottom: 7.2px; left: 7.2px; }

/* Reduced motion: the bulbs stay lit, the chase stops. */
@media (prefers-reduced-motion: reduce) {
  .hm-edge i, .hm-corner { animation: none; opacity: 0.85; }
}


/* ===== hero-border-plain-20261005 =====
   Hero border animation removed on Travis's call. Everything above is intact;
   deleting these two rules brings the marquee back exactly as it was. */
.hero-marquee { display: none; }


/* ===== guest-chrome-20261005 =====
   Support and help are reachable WITHOUT a session (signed-out-help-20261005), so
   a visitor with no account lands on a page still wearing account furniture: a
   "Player" chip with a dropdown, a notifications bell, and a VIP card reading
   "No VIP / 0 pts". To someone who is on that page precisely because they cannot
   sign in, that reads as though they are signed in.

   A DISTINCT CLASS, not .guest-mode. The dashboard's guest view is a deliberate
   design and its header is not this change's business; only the two pages that
   newly render signed out get this. portal.js adds the class in that branch.

   index.html carries `.guest-mode .sidebar-vip { display: none; }` in its own
   inline style block, which is why it never reached any other page -- the same
   inline-only trap that made the hero work invisible earlier today. */
body.guest-chrome-off .sidebar-vip,
body.guest-chrome-off .header-user,
body.guest-chrome-off #portalNotifToggle,
body.guest-chrome-off #portalNotifPanel,
/* guest-chips-20261005 -- the credit chips are account chrome too. They reached help/support
   after the header went on every page, and a visitor with no session was shown
   two empty balances linking to a page that bounces them to sign-in. */
body.guest-chrome-off #topbarCredits { display: none !important; }

/* guest-dash-chips-20261005 -- and on the dashboard, which a guest reaches without
   guest-chrome-off. Scoped to the chips alone: the guest dashboard's hero, sign-in
   buttons and account chip are a deliberate marketing surface and stay exactly as
   they are. A visitor with no account has no balance to show. */
body.guest-mode #topbarCredits { display: none !important; }


/* ===== header-all-pages-20261005 : header credit chips =====
   These lived ONLY in index.html's inline style block, so the dashboard was the
   only page that could show them. Nine pages use them now, so the rules belong
   here. index.html keeps its own copy, deliberately: nothing about the dashboard
   changes as part of this.

   The <=560px block is Travis's: the label STACKS above the figure on a phone
   rather than being hidden, because two bare numbers gave no way to tell credits
   from bonus. Stacked, both chips still fit beside the logo and the avatar. */
.topbar-credits { display: flex; align-items: center; gap: 8px; margin-right: 4px; }
.tbc-chip { display: inline-flex; align-items: baseline; gap: 6px;
            padding: 6px 12px; border-radius: 999px; text-decoration: none;
            background: var(--sc-surface-alt, #121a15);
            border: 1px solid var(--sc-border, #223029); }
.tbc-label { font-size: 11px; letter-spacing: .04em; text-transform: uppercase;
             color: var(--sc-text-muted, #aeb6b0); }
.tbc-value { font-size: 14px; font-weight: 700; color: var(--sc-text, #f7f8f7); }
@media (max-width: 560px) {
  .tbc-chip { flex-direction: column; align-items: center; gap: 0;
              padding: 4px 10px; line-height: 1.15; }
  .tbc-label { display: block; font-size: 9px; letter-spacing: .03em; }
  .tbc-value { font-size: 13px; }
  .topbar-credits { gap: 6px; margin-right: 2px; }
}


/* ── menuscroll-20261022 -- the hamburger drawer cut off its own VIP card on phones ──
   Travis: "the bottom of the menu is cut off where the vip status is".
   .sidebar/.portal-sidebar are position:fixed with height:100vh (portal.css:114, :1633).
   On iOS Safari and Android Chrome 100vh is the LARGE viewport -- the height with the
   address bar and bottom toolbar collapsed. With the toolbars showing (always, right
   after a tap on the hamburger) the drawer's last ~80-110px sit under the toolbar, so
   even scrolled to the very end the VIP card is behind it. At 430x932 the drawer's
   content fit 100vh exactly, so it did not scroll at all and the card was simply
   unreachable. Desktop Chromium cannot show this: there 100vh == the visible height.
   Fix: size the drawer to the VISIBLE viewport (top:0 + bottom:0 tracks it everywhere;
   100dvh where supported), keep it a single scroll column, contain the scroll so a
   flick at the end does not scroll the page behind (measured: wallet.html scrolled the
   page 1972px behind an open drawer), pad the bottom for the home indicator, and lock
   the page behind while the drawer is open. Scroll position is the drawer's own
   scrollTop; nothing re-renders the drawer, so it stays where the player leaves it.
   Mobile only -- desktop sidebar untouched. */
@media (max-width: 768px) {
  .sidebar, .portal-sidebar {
    top: 0;
    bottom: 0;
    height: auto;
    max-height: none;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    overscroll-behavior-y: contain;
    touch-action: pan-y;
    padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  }
  .sidebar .sidebar-vip, .portal-sidebar .sidebar-vip { flex-shrink: 0; }
  .sidebar-overlay.open { touch-action: none; overscroll-behavior: contain; }
  html:has(.sidebar.open), html:has(.portal-sidebar.open),
  body:has(.sidebar.open), body:has(.portal-sidebar.open) { overflow: hidden; overscroll-behavior: none; }
}
@supports (height: 100dvh) {
  @media (max-width: 768px) {
    .sidebar, .portal-sidebar { height: 100dvh; bottom: auto; }
  }
}


/* ==========================================================================
   pwsave-20261022 -- "Add your password" / "Edit" on a platform tile, and the
   popup that saves the player's own game password (portal.js editPlatformPassword).
   ========================================================================== */
.pwd-add-link, .pwd-edit-link {
  background: none; border: none; padding: 0; margin: 0;
  color: var(--sc-lime); font: inherit; font-family: Inter, sans-serif;
  font-weight: 600; text-decoration: underline; text-underline-offset: 2px; cursor: pointer;
}
.pwd-ref-note {
  font-family: Inter, sans-serif; font-size: 11px; font-weight: 400; line-height: 1.4;
  color: var(--sc-text-muted, #9AA39C); white-space: normal;
}
.credential-row.pwd-meta-row,
.platform-card .credential-row.pwd-meta-row {
  flex-wrap: wrap; align-items: baseline; line-height: 1.4; gap: 2px 8px; padding-bottom: 2px;
}
.pwd-modal-intro { font-size: 13px; color: var(--sc-text-muted); line-height: 1.6; margin: 0 0 14px; }
.pwd-modal-label { display: block; font-size: 13px; font-weight: 500; color: var(--sc-text-muted); margin-bottom: 6px; }
.pwd-modal-field { display: flex; gap: 8px; align-items: stretch; margin-bottom: 10px; }
.pwd-modal-field input {
  flex: 1 1 auto; min-width: 0; box-sizing: border-box;
  background: var(--sc-surface-alt); border: 1px solid var(--sc-border); border-radius: 10px;
  padding: 11px 14px; font-size: 16px; /* 16px: iOS zooms the page on a smaller input */
  color: var(--sc-text); outline: none; font-family: 'SF Mono', 'Fira Code', Consolas, monospace;
}
.pwd-modal-error {
  background: rgba(255,77,77,0.1); border: 1px solid rgba(255,77,77,0.3); border-radius: 8px;
  padding: 10px 14px; margin-bottom: 14px; font-size: 13px; color: var(--sc-danger);
}
.modal-box .pwd-ref-note { margin: 0; display: block; }
.pwd-modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

/* ==========================================================================
   tilealign-20261022 -- every tile in a row lines up, field by field.
   Travis: "the tile next to it doesnt match where the buttons are. i want
   everything to line up. make sure all fields match so it doesnt look wonky."
   Golden Dragon's PIN explanation (and any wrapped name, credit line or
   password note) made that one tile's rows taller and pushed its status and
   buttons below its neighbour's.
   HOW: each tile is a SUBGRID of the row it sits in, and its body a subgrid of
   the tile, so every tile in a grid row shares the same six row tracks:
     art | name | credits | credentials-or-account-actions | status | buttons
   The tallest tile's field sets the track, so every sibling's same field starts
   at the same y and every button row starts at the same y. Content is never
   clipped. Rows are pinned by class, so a tile without a credits line (unlinked)
   leaves that track empty instead of shifting everything up.
   Row gap is moved onto the tiles' margin because a grid row-gap would also
   open between the six internal tracks. Guest tiles (art only) are left as they
   were apart from that margin. Fallback where subgrid is unsupported: buttons
   pinned to the bottom of an equal-height tile. Both grids -- the dashboard
   .platforms-track and platforms.html .platform-grid -- use the same rules.
   ========================================================================== */
.platforms-track.platforms-track > .platform-card:not(.guest-platform-card),
.platform-grid > .platform-card { display: flex; flex-direction: column; }
.platforms-track.platforms-track > .platform-card:not(.guest-platform-card) > .platform-card-body,
.platform-grid > .platform-card > .platform-card-body { flex: 1 1 auto; display: flex; flex-direction: column; }
.platforms-track.platforms-track > .platform-card:not(.guest-platform-card) .platform-card-actions,
.platform-grid > .platform-card .platform-card-actions { margin-top: auto; }
@supports (grid-template-rows: subgrid) {
  .platforms-track.platforms-track { row-gap: 0; }
  .platform-grid.platform-grid { row-gap: 0; }
  .platforms-track.platforms-track > .platform-card { margin-bottom: 14px; }
  .platform-grid.platform-grid > .platform-card { margin-bottom: 20px; }
  .platforms-track.platforms-track > .platform-card:not(.guest-platform-card),
  .platform-grid.platform-grid > .platform-card {
    display: grid; grid-template-rows: subgrid; grid-row: span 6; row-gap: 0;
  }
  .platforms-track.platforms-track > .platform-card:not(.guest-platform-card) > .platform-card-image,
  .platform-grid.platform-grid > .platform-card > .platform-card-image { grid-row: 1; }
  .platforms-track.platforms-track > .platform-card:not(.guest-platform-card) > .platform-card-body,
  .platform-grid.platform-grid > .platform-card > .platform-card-body {
    grid-row: 2 / span 5; display: grid; grid-template-rows: subgrid; row-gap: 0;
  }
  .platform-card > .platform-card-body > .platform-card-name { grid-row: 1; }
  .platform-card > .platform-card-body > .platform-card-balance { grid-row: 2; }
  .platform-card > .platform-card-body > .platform-card-credentials { grid-row: 3; align-self: start; }
  /* An unlinked tile's Create/Connect ARE its buttons, so they sit in the button
     track beside a linked neighbour's Play/Add Credits rather than 70px above
     them. Its .platform-card-actions is empty on an unlinked tile (every button in
     it needs a linked account), so the two never share the cell with content. */
  .platform-card > .platform-card-body > .platform-card-account-actions { grid-row: 5; align-self: start; padding-top: 0; }
  .platform-card > .platform-card-body > .platform-card-status { grid-row: 4; align-self: start; }
  .platform-card > .platform-card-body > .platform-card-actions { grid-row: 5; align-self: start; margin-top: 0; }
  /* tilealign3-20261022 -- THE COLUMN MUST NOT GROW. A grid's implicit column is
     `auto`, which a nowrap child (the username/password value rows) can widen past
     the card's padding box. Measured at 390: one tile's buttons 147px wide with a
     1.8px right inset against its neighbour's 134px / 15px, three elements outside
     the card, and -- because the art is a 1:1 box -- that tile's image 13px taller.
     minmax(0,1fr) pins the column to the card's content width, so the value rows
     ellipsize (as .platform-card .credential-value was always written to) instead. */
  .platforms-track.platforms-track > .platform-card:not(.guest-platform-card),
  .platform-grid.platform-grid > .platform-card,
  .platforms-track.platforms-track > .platform-card:not(.guest-platform-card) > .platform-card-body,
  .platform-grid.platform-grid > .platform-card > .platform-card-body { grid-template-columns: minmax(0, 1fr); }
  .platform-card > .platform-card-body > * { min-width: 0; max-width: 100%; }
}


/* ==========================================================================
   tilealign4-20261022 -- credential values on the narrow dashboard tile.
   With the column pinned (tilealign3) the value rows can no longer spill past
   the card -- but on a 390px phone the tile is ~134px inside its padding and
   the two 44px tap targets (portal-qa-sweep touch-target rule) left 38px for
   the password, so "********" ellipsized and a revealed password or a long
   username would be cut. A player has to read the whole credential to type
   it, so the values WRAP (any character) instead of truncating, and on this
   tile only the eye/copy targets are 30px wide (height stays 44px). Rows still
   line up across a row of tiles: the subgrid track takes the tallest.
   ========================================================================== */
.platform-card .credential-value {
  /* overflow-wrap:anywhere breaks at spaces first and splits a token only when it
     cannot fit -- so Golden Dragon's PIN sentence wraps between words while a long
     username still cannot overflow. (word-break:break-all here split "number".) */
  white-space: normal; overflow: visible; text-overflow: clip;
  overflow-wrap: anywhere; word-break: normal;
}
.platform-card .password-masked { flex: 1 1 auto; min-width: 0; }
.platform-card .pwd-text { flex: 1 1 auto; min-width: 0; white-space: normal; overflow-wrap: anywhere; word-break: break-all; }
.platform-card .pwd-add-link, .platform-card .pwd-edit-link { word-break: normal; overflow-wrap: normal; text-align: left; }
@media (max-width: 768px) {
  .platforms-track .platform-card .credential-copy,
  .platforms-track .platform-card .pwd-toggle { min-width: 30px; }
}


/* ==========================================================================
   wordwrap-20261022 -- Travis: "the word 'number' has the r on the next line
   breaking up the word". Explanatory text on a tile is a SENTENCE, not a
   credential: it wraps between words only, never mid-word, no hyphenation, and
   is set in the tile's body font (Inter) rather than the monospace credential
   face. Break-anywhere stays ONLY on the real values (username text, the
   password, the account code), which are single unbroken tokens and must not
   overflow the tile.
   ========================================================================== */
.platform-card .credential-explain,
.platform-card .pwd-add-link,
.platform-card .pwd-edit-link,
.platform-card .pwd-ref-note,
.platform-card .platform-card-status,
.platform-card .platform-card-status * {
  word-break: normal; overflow-wrap: normal; hyphens: none; -webkit-hyphens: none;
}
.platform-card .credential-explain {
  display: block; white-space: normal;
  font-family: Inter, sans-serif; font-size: 12px; font-weight: 400; line-height: 1.45;
  letter-spacing: 0; color: var(--sc-text-muted, #9AA39C);
}
.platform-card .pwd-add-link, .platform-card .pwd-edit-link { font-size: 12px; }
.platform-card .pwd-ref-note { font-size: 11px; }


/* ==========================================================================
   dashtap-20261022 -- (1) PIN explanation in the SAME face as the reference
   note: Inter 11px / 400 / muted. The account number above it stays monospace.
   (2) Phone dashboard tiles: art only, tap the art to reveal the login.
   Travis: "for the platforms on the dashboard view on the mobile version only,
   you should hide all of the login stuff and only have the image" -- "but leave
   them on the my platforms page". Scoped to .platforms-track (index.html) and
   .dash-tile, which only the dashboard renderer emits; platforms.html's
   .platform-grid never matches. portal.js applyDashTiles() flips .is-open.
   A COLLAPSED tile leaves the row's shared subgrid (display:block, top-aligned,
   still spanning the row's six tracks) so it stays art-height even when its
   row-mate is expanded; an EXPANDED tile keeps the subgrid, so two expanded
   tiles in a row still line up field for field.
   ========================================================================== */
.platform-card .credential-value.credential-explain {
  display: block; font-family: Inter, sans-serif; font-size: 11px; font-weight: 400;
  line-height: 1.4; letter-spacing: 0; color: var(--sc-text-muted, #9AA39C);
}
.dash-tile-hint { display: none; }
@media (max-width: 640px) {
  .platforms-track > .platform-card.dash-tile > .platform-card-image {
    position: relative; cursor: pointer; -webkit-tap-highlight-color: transparent;
  }
  .platforms-track > .platform-card.dash-tile > .platform-card-image:focus-visible {
    outline: 2px solid var(--sc-lime); outline-offset: -2px;
  }
  .platforms-track .dash-tile-hint {
    display: block; position: absolute; left: 0; right: 0; bottom: 0; z-index: 1;
    padding: 6px 8px; background: rgba(5, 8, 7, 0.62); color: #fff;
    font-family: Inter, sans-serif; font-size: 11px; font-weight: 500; line-height: 1.3;
    letter-spacing: 0; text-align: center; pointer-events: none;
  }
  /* drawer-20261022 (Option C): on a phone EVERY dashboard tile is art-only -- no
     subgrid, one plain grid row each -- and the open tile's body lives in the
     full-width .dash-drawer under its row (portal.js applyDashTiles). */
  .platforms-track.platforms-track { row-gap: 14px; }
  .platforms-track.platforms-track > .platform-card { margin-bottom: 0; }
  .platforms-track.platforms-track > .platform-card.dash-tile {
    display: block; grid-row: auto; align-self: start;
  }
  .platforms-track.platforms-track > .platform-card.dash-tile > .platform-card-body { display: none; }
  .platforms-track.platforms-track > .platform-card.dash-tile.is-open {
    border-color: var(--sc-lime); box-shadow: 0 0 0 2px var(--sc-lime);
  }
  .platforms-track > .dash-drawer { grid-column: 1 / -1; position: relative; margin-top: 2px; }
  .platforms-track > .dash-drawer::before {
    content: ''; position: absolute; top: -7px; left: var(--dash-caret-x, 25%); z-index: 1;
    width: 12px; height: 12px; transform: translateX(-50%) rotate(45deg);
    background: var(--sc-surface); border-left: 2px solid var(--sc-lime); border-top: 2px solid var(--sc-lime);
  }
  .platforms-track > .dash-drawer > .dash-drawer-card {
    border: 2px solid var(--sc-lime); border-radius: 14px; transform: none; overflow: hidden;
  }
  .platforms-track > .dash-drawer > .dash-drawer-card:hover { transform: none; }
  .platforms-track > .dash-drawer .platform-card-body { display: flex; flex-direction: column; padding: 14px 16px; }
  /* Buttons LAST in every drawer: an unlinked tile's Create/Connect sit in the
     credentials slot in the DOM, which put them above the status line. */
  .platforms-track > .dash-drawer .platform-card-account-actions { order: 10; }
  .platforms-track > .dash-drawer .platform-card-actions:empty { display: none; }
  /* The tile-subgrid rules pin body children to align-self:start; in the drawer's
     flex column that shrank Create/Connect to their text width. Stretch them. */
  .platforms-track > .dash-drawer .platform-card-body > * { align-self: stretch; }
  /* Full width: buttons three across instead of stacked. */
  .platforms-track .dash-drawer .platform-card-actions,
  .platforms-track .dash-drawer .platform-card-account-actions {
    flex-direction: row; flex-wrap: nowrap; align-items: stretch; gap: 8px; margin-top: 10px;
  }
  .platforms-track .dash-drawer .platform-card-actions .btn,
  .platforms-track .dash-drawer .platform-card-account-actions .btn {
    flex: 1 1 0; min-width: 0; justify-content: center; white-space: nowrap; padding-left: 4px; padding-right: 4px;
  }
}


/* ==========================================================================
   modalfit-20261022 -- Travis: "on the mobile view, when i click the cash out
   button on the dashboard ... the top of the cashout popup is cut off".
   Cause: .modal-overlay centres its box (align-items:center) and .modal-box caps
   itself at 90vh. On iOS Safari / Android Chrome 100vh is the LARGE viewport
   (toolbars hidden), so with the toolbars showing the box is taller than the
   visible screen and centring pushes its top -- title and close X -- above it.
   (Measured with the large viewport emulated: box top -7px at 360x640, -5px at
   375x667. Desktop Chromium cannot show it: there 100vh == visible height.)
   Fix, phones/tablets only (<=768px), desktop untouched:
   - overlay pinned top:0/bottom:0 (= the visible viewport), box aligned to the
     top with margin:auto, so it centres when it fits and can NEVER start above
     the screen when it does not (a centred flex item overflows both ends);
   - box max-height from the dynamic viewport (100dvh, 100vh fallback) minus the
     padding and safe-area insets; it scrolls INSIDE, with the header pinned so
     the close X stays reachable while scrolling the form;
   - overscroll-behavior:contain and the page behind locked while a modal is open.
   Same treatment for the home page's login modal (.login-modal-overlay, whose
   rules live in index.html's inline style). Rollback: delete this block.
   ========================================================================== */
@media (max-width: 768px) {
  .modal-overlay,
  .login-modal-overlay.login-modal-overlay {
    top: 0; bottom: 0; height: auto;
    align-items: flex-start;
    padding: calc(16px + env(safe-area-inset-top, 0px)) 12px calc(16px + env(safe-area-inset-bottom, 0px));
    box-sizing: border-box;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
  .modal-overlay > .modal-box,
  .modal-overlay > .modal {
    margin: auto;
    width: 100%;
    max-height: calc(100vh - 32px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
  @supports (height: 100dvh) {
    .modal-overlay > .modal-box,
    .modal-overlay > .modal {
      max-height: calc(100dvh - 32px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
    }
  }
  .modal-overlay > .modal-box > .modal-header,
  .modal-overlay > .modal > .modal-header {
    position: sticky; top: 0; z-index: 2;
    background: var(--sc-card-bg, #1a1a1a);
  }
  .login-modal-overlay > .login-modal { margin: auto; }
  html:has(.modal-overlay.open), html:has(.login-modal-overlay.open),
  html:has(.modal-overlay.open) body, html:has(.login-modal-overlay.open) body { overflow: hidden; }
}


/* pwshow-20261022 -- password popup: Show sizes to its label, the input takes the rest.
   The global phone rule .btn { width:100% } (portal.css ~1623) gave Show a 100% basis,
   so at 360 it took 159px and squeezed the input to 127px (found by mobile-action-tiles). */
.pwd-modal-field .btn { flex: 0 0 auto; width: auto; padding-left: 16px; padding-right: 16px; }
.pwd-modal-field input { flex: 1 1 auto; }

/* ==========================================================================
   dashgrid-20261022 -- the phone tap-to-reveal drawer on My Platforms (.platform-grid),
   GENERATED from the dashboard's own phone block (drawer-20261022) with .platforms-track
   swapped for .platform-grid, so the two pages cannot drift apart in look. Keep them in
   step: change one, regenerate the other.
   ========================================================================== */
@media (max-width: 640px) {
  /* dashgrid-20261022 -- My Platforms becomes the same 2-up art grid on a phone (it is
     one column at <=768 otherwise), and the page's own tile caps are undone. */
  .platform-grid.platform-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 14px; }
  .platform-grid.platform-grid > .platform-card.dash-tile { margin: 0; max-width: none; width: auto; min-width: 0; }
  .platform-grid > .dash-drawer > .dash-drawer-card { min-width: 0; max-width: none; width: auto; }
  .platform-grid > .platform-card.dash-tile > .platform-card-image {
    position: relative; cursor: pointer; -webkit-tap-highlight-color: transparent;
  }
  .platform-grid > .platform-card.dash-tile > .platform-card-image:focus-visible {
    outline: 2px solid var(--sc-lime); outline-offset: -2px;
  }
  .platform-grid .dash-tile-hint {
    display: block; position: absolute; left: 0; right: 0; bottom: 0; z-index: 1;
    padding: 6px 8px; background: rgba(5, 8, 7, 0.62); color: #fff;
    font-family: Inter, sans-serif; font-size: 11px; font-weight: 500; line-height: 1.3;
    letter-spacing: 0; text-align: center; pointer-events: none;
  }
  /* drawer-20261022 (Option C): on a phone EVERY dashboard tile is art-only -- no
     subgrid, one plain grid row each -- and the open tile's body lives in the
     full-width .dash-drawer under its row (portal.js applyDashTiles). */
  .platform-grid.platform-grid { row-gap: 14px; }
  .platform-grid.platform-grid > .platform-card { margin-bottom: 0; }
  .platform-grid.platform-grid > .platform-card.dash-tile {
    display: block; grid-row: auto; align-self: start;
  }
  .platform-grid.platform-grid > .platform-card.dash-tile > .platform-card-body { display: none; }
  .platform-grid.platform-grid > .platform-card.dash-tile.is-open {
    border-color: var(--sc-lime); box-shadow: 0 0 0 2px var(--sc-lime);
  }
  .platform-grid > .dash-drawer { grid-column: 1 / -1; position: relative; margin-top: 2px; }
  .platform-grid > .dash-drawer::before {
    content: ''; position: absolute; top: -7px; left: var(--dash-caret-x, 25%); z-index: 1;
    width: 12px; height: 12px; transform: translateX(-50%) rotate(45deg);
    background: var(--sc-surface); border-left: 2px solid var(--sc-lime); border-top: 2px solid var(--sc-lime);
  }
  .platform-grid > .dash-drawer > .dash-drawer-card {
    border: 2px solid var(--sc-lime); border-radius: 14px; transform: none; overflow: hidden;
  }
  .platform-grid > .dash-drawer > .dash-drawer-card:hover { transform: none; }
  .platform-grid > .dash-drawer .platform-card-body { display: flex; flex-direction: column; padding: 14px 16px; }
  /* Buttons LAST in every drawer: an unlinked tile's Create/Connect sit in the
     credentials slot in the DOM, which put them above the status line. */
  .platform-grid > .dash-drawer .platform-card-account-actions { order: 10; }
  .platform-grid > .dash-drawer .platform-card-actions:empty { display: none; }
  /* The tile-subgrid rules pin body children to align-self:start; in the drawer's
     flex column that shrank Create/Connect to their text width. Stretch them. */
  .platform-grid > .dash-drawer .platform-card-body > * { align-self: stretch; }
  /* Full width: buttons three across instead of stacked. */
  .platform-grid .dash-drawer .platform-card-actions,
  .platform-grid .dash-drawer .platform-card-account-actions {
    flex-direction: row; flex-wrap: nowrap; align-items: stretch; gap: 8px; margin-top: 10px;
  }
  .platform-grid .dash-drawer .platform-card-actions .btn,
  .platform-grid .dash-drawer .platform-card-account-actions .btn {
    flex: 1 1 0; min-width: 0; justify-content: center; white-space: nowrap; padding-left: 4px; padding-right: 4px;
  }
}


/* ==========================================================================
   grid3-20261022 -- My Platforms phone grid: THREE per row from 375px to 640px
   (team-lead decision on Travis's "possibly three per row if it looks good"),
   two per row below 375px. In the 3-up band the hint is a SLIM gradient strip
   ("Tap to view", 11px, ~17px tall, under 16% of the art) so the logo names
   that sit at the bottom of most of this artwork stay readable. The dashboard
   and the 2-up grid keep the standard strip. Drawer and caret logic need no
   change: portal.js reads the column count from the grid itself.
   ========================================================================== */
.dash-tile-hint .dash-hint-short { display: none; }
@media (min-width: 375px) and (max-width: 640px) {
  .platform-grid.platform-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 10px; row-gap: 10px; }
  .platform-grid .dash-tile-hint {
    padding: 2px 4px; font-size: 11px; line-height: 13px; font-weight: 600;
    background: linear-gradient(to top, rgba(5, 8, 7, 0.72), rgba(5, 8, 7, 0.40) 70%, rgba(5, 8, 7, 0));
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
  }
  .platform-grid .dash-tile-hint .dash-hint-long { display: none; }
  .platform-grid .dash-tile-hint .dash-hint-short { display: inline; }
}


/* ==========================================================================
   nodemo-20261022 -- My Platforms loading skeleton and load-error state.
   platforms.html no longer ships demo cards; portal.js shows these instead.
   ========================================================================== */
.plat-skel { background: var(--sc-surface); border: 1px solid var(--sc-border); border-radius: 14px; overflow: hidden; min-width: 0; }
.plat-skel-art {
  aspect-ratio: 1 / 1;
  background: linear-gradient(100deg, rgba(255,255,255,0.03) 30%, rgba(255,255,255,0.09) 50%, rgba(255,255,255,0.03) 70%);
  background-size: 200% 100%; animation: platSkelShimmer 1.4s ease-in-out infinite;
}
.plat-skel-line { height: 12px; margin: 14px 16px 0; border-radius: 6px; background: rgba(255,255,255,0.06); }
.plat-skel-line.short { width: 45%; margin-bottom: 16px; }
@keyframes platSkelShimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@media (prefers-reduced-motion: reduce) { .plat-skel-art { animation: none; } }
@media (min-width: 641px) and (max-width: 768px) {
  .platform-grid > .plat-skel { max-width: 480px; width: 100%; margin-left: auto; margin-right: auto; }
}
@media (max-width: 640px) { .platform-grid .plat-skel-line { display: none; } }
.plat-load-error { text-align: center; padding: 32px 16px; }
.plat-load-error p { margin: 0 0 14px; color: var(--sc-text-muted); font-size: 14px; line-height: 1.5; }


/* rwlabel-20261022 -- Add Credits in-progress label (portal.js rechargeWaitPaintLabel).
   Phones show the short wording at 11px on one line so "Loading 12s" fits the ~100px
   drawer buttons; wider screens keep the full "Loading credits 12s..." text. */
.rw-wrap .rw-short { display: none; }
@media (max-width: 640px) {
  .rw-wrap { gap: 4px !important; max-width: 100%; min-width: 0; }
  .rw-wrap .rw-long { display: none; }
  .rw-wrap .rw-short { display: inline; font-size: 11px; letter-spacing: -0.2px; white-space: nowrap; }
  .rw-wrap .spinner { flex: 0 0 auto; }
}


/* mobile-20261030 -- phone tables and two small controls (Travis: "make sure this is working on mobile").
   1. Every .table-wrap table is wider than a phone and scrolls sideways by design, but width:auto
      sizes it to its MIN-content width, so each column was squeezed to its longest word: dates
      broke over 4-5 lines and one long Details note made a row 254px tall (measured, 360px,
      transactions). No-wrap cells give every column its natural width instead; the LAST column
      (Details / Detail / Reference / Status) keeps wrapping inside 200px so a long note cannot
      make the table endless. State rows (colspan) keep wrapping.
   2. #filterSearch (.form-input-sm) measured 38px tall; the login/register eye button 26x26.
      The eye keeps its centre where it was (right 14px + 13px = 27px from the edge). */
@media (max-width: 768px) {
  .table-wrap th, .table-wrap td { white-space: nowrap; }
  .table-wrap td:last-child { white-space: normal; min-width: 200px; }
  .table-wrap td[colspan] { white-space: normal; min-width: 0; }
  .form-input-sm { min-height: 44px; }
  button.password-toggle { min-width: 44px; min-height: 44px; right: 5px; }
}

/* ==========================================================================
   greyout-20261101 -- TEMPORARILY UNAVAILABLE PLATFORM (Travis: "grey it out instead and say
   come back later to play"). The tile stays on screen; the art is greyed and labelled, there is
   no hover lift, and portal.js renders no Play / Add Credits / Redeem / Create / Connect on it.
   Balance and login details stay readable.
   ========================================================================== */
.platform-card.platform-unavailable,
.platform-card.platform-unavailable:hover {
  transform: none;
  border-color: var(--sc-border);
  box-shadow: none;
}
.platform-card.platform-unavailable > .platform-card-image > *:not(.dash-tile-hint) {
  opacity: 0.4;
  filter: grayscale(1);
}
.platform-card.platform-unavailable > .platform-card-image::after {
  content: 'Temporarily unavailable';
  position: absolute; left: 0; right: 0; top: 0; z-index: 2;
  padding: 6px 8px; background: rgba(5, 8, 7, 0.78); color: #fff;
  font-family: Inter, sans-serif; font-size: 11px; font-weight: 600; line-height: 1.3;
  letter-spacing: 0; text-align: center; pointer-events: none;
}
.platform-card.platform-unavailable .platform-card-name,
.platform-card.platform-unavailable .platform-card-balance,
.platform-card.platform-unavailable .platform-card-credentials { opacity: 0.7; }
.platform-card .platform-status-dot.platform-status-unavailable {
  color: var(--sc-text-muted, #9AA39C);
  white-space: normal;
  line-height: 1.35;
}

/* promopage-20261109 -- promo art shown whole as a banner, text below it (was painted
   behind the text, cropped, its own lettering running through the title). */
.promo-banner-card.promo-has-img {
  padding: 0;
  display: flex;
  flex-direction: column;
  background: var(--sc-surface, #111);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.promo-banner-card.promo-has-img .promo-banner-img { line-height: 0; }
.promo-banner-card.promo-has-img .promo-banner-img img { display: block; width: 100%; height: auto; }
.promo-banner-card.promo-has-img .promo-banner-content {
  padding: 18px 22px 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.promo-banner-card.promo-has-img .promo-banner-headline { font-size: 24px; }
.promo-banner-card.promo-has-img .promo-banner-content > .btn { margin-top: auto; align-self: flex-start; }

/* promopage-20261109 -- not-available-today button: muted but readable */
.promo-banner-card .promo-unavail-btn,
html[data-theme] .promo-banner-card .promo-unavail-btn {
  display: inline-flex; align-items: center; gap: 6px;
  opacity: 1 !important; cursor: not-allowed;
  color: #c9ccd6 !important;
  background: rgba(255, 255, 255, 0.07) !important;
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
  box-shadow: none !important;
}
.promo-banner-card .promo-unavail-btn svg { flex-shrink: 0; }
