/* Invitation and subordinate-page colours based on the provided references.
   Existing controls and data remain visible. The reference has a different DOM. */
.invite-page, .invite-records-page {
  --background: #171515;
  --text: #f7f5f3;
  --muted: #b0adb4;
  --line: #3b393c;
  --brand: #deb392;
  --blue: #e0b795;
  --success: #9cca9d;
  background: #171515;
  color: #f7f5f3;
}
.invite-page .toolbar, .invite-records-page .toolbar,
.invite-records-page .toolbar.orange {
  color: #f7f5f3;
  background: #171515;
  border-color: #3b393c;
}
.invite-page .toolbar button, .invite-records-page .toolbar button { color: #f7f5f3; }
.invite-page .invite-bottom-nav {
  background: #1b1919;
  border-top: 1px solid #3b393c;
  box-shadow: 0 -3px 12px #0004;
}
.invite-page .invite-bottom-nav button { color: #b0adb4; }
.invite-page .invite-bottom-nav button.active { color: #e2b99b; }
.invite-page .invite-now {
  color: #181412;
  background: linear-gradient(105deg,#c69a7d,#e2b798);
}
.invite-records-page .invite-records-body > h2,
.invite-records-page .invite-member-panel > h3 { color: #f7f5f3; }
.invite-records-page .invite-metric,
.invite-records-page .invite-member-panel,
.invite-records-page .invite-member-card {
  background: #252424;
  border: 1px solid #39383a;
  border-radius: 15px;
}
.invite-records-page .invite-metric small,
.invite-records-page .invite-member-panel > small,
.invite-records-page .invite-member-card p,
.invite-records-page .invite-member-empty { color: #b0adb4; }
.invite-records-page .invite-metric strong,
.invite-records-page .invite-metric strong.primary,
.invite-records-page .invite-member-card b { color: #efc5a4; }
.invite-records-page .invite-member-card header > strong { color: #f7f5f3; }
.invite-records-page .invite-ratio,
.invite-records-page .invite-member-tags i {
  color: #e1bc9d;
  background: #3a302c;
}
.invite-records-page .invite-member-tags i.active { color: #a5d0a6; background: #303d31; }
.invite-records-page .invite-member-tags i.valid { color: #241b17; background: #dcb493; }

/* VIP reference palette. Existing cards, values and controls are preserved. */
.vip-page,
.vip-detail-page {
  --background: #171515;
  --text: #f8f6f4;
  --muted: #a8a5a7;
  --line: #373536;
  --brand: #e0b697;
  --blue: #e9bd9c;
  background: #171515;
  color: #f8f6f4;
}
.vip-page .vip-toolbar,
.vip-detail-page > .toolbar {
  color: #f8f6f4;
  background: #171515;
  border-color: #373536;
}
.vip-page .vip-toolbar button,
.vip-detail-page > .toolbar button { color: #f8f6f4; }
.vip-page .vip-scroll { background: #171515; }
.vip-page .vip-hero { color: #f8f6f4; background: #171515; }
.vip-page .vip-reference-background { filter: brightness(.2); }
.vip-page .vip-avatar { color: #e1b99a; background: #403630; }
.vip-page .vip-card-arrow { color: #e1b99a; }
.vip-page .vip-progress-row > span::before,
.vip-page .vip-progress-row > span::after { background: #464143; }
.vip-page .vip-progress-row .deposit { background: #e0b697; }
.vip-page .vip-progress-row .bet { background: #a6c4ab; }
.vip-page .vip-reference-section,
.vip-detail-page .content-card {
  color: #f8f6f4;
  background: #252323;
  border-color: #393737;
}
.vip-page .vip-reference-section h2 i { color: #e0b697; }
.vip-page .vip-benefit-row small { color: #b6afb0; }
.vip-page .vip-benefit-row > button {
  color: #211915;
  background: linear-gradient(105deg,#c89b7b,#e3b99b);
}
.vip-page .vip-split { background: #4b4445; }
.vip-detail-page .vip-detail-head strong,
.vip-detail-page .vip-rebate-table strong { color: #e8bb9a; }
.vip-detail-page .vip-detail-head p { color: #b4aeb0; }
.vip-detail-page .vip-rebate-table,
.vip-detail-page .vip-rebate-table > div { border-color: #3b3838; }
/* Override the higher-specificity white page background and light stat cards. */
.page.white.invite-page { background: #171515; }
.vip-detail-page .stat { background: #302d2e; color: #f8f6f4; border: 1px solid #454142; }
.vip-detail-page .stat span { color: #bcb5b7; }
.vip-detail-page .stat strong { color: #f8f6f4; overflow-wrap: anywhere; }
/* Detail pages are full-height; avoid the default bottom-navigation gap. */
.invite-records-page, .vip-detail-page { min-height: 100dvh; }
/* Keep subordinate metric labels and amounts legible on narrow phones. */
.invite-records-page .invite-metric { min-width: 0; }
.invite-records-page .invite-metric small,
.invite-records-page .invite-metric strong { overflow: visible; white-space: normal; overflow-wrap: anywhere; }
/* Place the invitation button directly below the poster without wasting space. */
.invite-page .invite-content { grid-template-rows: minmax(0, auto) 54px; align-content: start; }
.invite-page .invite-banner {
  height: auto;
  max-height: calc(100dvh - 56px - 76px - 54px - 36px - var(--safe-top) - var(--safe-bottom));
}
/* Agent pages retain the existing layout and actions while matching the dark theme. */
.agent-page {
  --background: #171515; --text: #f7f5f3; --muted: #b6afb0;
  --line: #413c3e; --brand: #deb392; --blue: #ddb493;
  --success: #8fd39d; min-height: 100dvh; background: #171515; color: #f7f5f3;
}
.agent-page .toolbar { color: #f7f5f3; background: #171515; border-color: #413c3e; }
.agent-page .toolbar button { color: #f7f5f3; }
.agent-page .content-card, .agent-page .member-card, .agent-page .report-table {
  color: #f7f5f3; background: #252323; border-color: #413c3e;
}
.agent-page .stat { color: #f7f5f3; background: #302d2e; border: 1px solid #413c3e; min-width: 0; }
.agent-page .stat strong { overflow-wrap: anywhere; }
.agent-page .member-card-head { color: #f7f5f3; }
.agent-page .member-card-head strong { min-width: 0; overflow-wrap: anywhere; }
.agent-page .member-card-head i { color: #e7c3a9; background: #463932; flex-shrink: 0; }
.agent-page .report-row { border-color: #413c3e; }
.agent-page .report-row > span { min-width: 0; overflow-wrap: anywhere; }
.agent-page .agent-report-links button { color: #f7f5f3; background: #252323; border-color: #413c3e; }
.agent-page .agent-nav { background: #252323; border-color: #413c3e; }
.agent-page .agent-nav button { color: #b6afb0; }
.agent-page .agent-nav button.active { color: #e4bd9f; }
.agent-page .primary-button { color: #201713; background: linear-gradient(105deg,#c89b7b,#e3b99b); }
.agent-page .agent-report-filter {
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: end; background: #252323;
}
.agent-page .agent-report-filter label { min-width: 0; }
.agent-page .agent-report-filter input {
  color: #f7f5f3; background: #302d2e; border-color: #4a4345;
  min-width: 0; max-width: 100%; color-scheme: dark;
}
.agent-page .agent-report-filter > input { grid-column: 1 / 3; }
.agent-page .agent-report-filter > button {
  width: 100%; color: #201713; background: #dbb393; white-space: nowrap;
}
