/* RiverX V157 — shared controls, surfaces, forms, status, and feedback. */
body.rx-v157 :where(.rx-btn, .primary-btn, .secondary-btn, .ghost-btn, .danger-btn, .btn-3) {
  min-height: 42px !important;
  padding: 0 16px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  color: var(--rx157-text) !important;
  border: 1px solid transparent !important;
  border-radius: var(--rx157-radius-sm) !important;
  box-shadow: none !important;
  font-size: 13px !important;
  font-weight: 760 !important;
  line-height: 1.1 !important;
  letter-spacing: 0 !important;
  text-decoration: none !important;
  transform: none !important;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, opacity 150ms ease !important;
}

body.rx-v157 :where(.rx-btn, .primary-btn, .secondary-btn, .ghost-btn, .danger-btn, .btn-3):hover:not(:disabled) {
  transform: none !important;
  filter: brightness(1.06) !important;
}

body.rx-v157 :where(.rx-btn, .primary-btn, .secondary-btn, .ghost-btn, .danger-btn, .btn-3):active:not(:disabled) {
  filter: brightness(0.96) !important;
}

body.rx-v157 :where(.rx-btn, .primary-btn, .secondary-btn, .ghost-btn, .danger-btn, .btn-3):disabled {
  cursor: not-allowed !important;
  opacity: 0.46 !important;
  filter: none !important;
}

body.rx-v157 :where(.primary-btn, .rx-btn-purple) {
  color: #fff !important;
  background: var(--rx157-brand) !important;
  border-color: var(--rx157-brand) !important;
}

body.rx-v157 :where(.secondary-btn, .ghost-btn, .rx-btn-dark) {
  color: var(--rx157-text-soft) !important;
  background: rgba(255, 255, 255, 0.035) !important;
  border-color: var(--rx157-border) !important;
}

body.rx-v157 :where(.secondary-btn, .ghost-btn, .rx-btn-dark):hover:not(:disabled) {
  color: #fff !important;
  background: var(--rx157-surface-soft) !important;
  border-color: var(--rx157-border-strong) !important;
}

body.rx-v157 :where(.rx-btn-green, .btn-3) {
  color: #fff !important;
  background: var(--rx157-success) !important;
  border-color: var(--rx157-success) !important;
}

body.rx-v157 :where(.rx-btn-gold, .secondary-btn.gold) {
  color: #f4d996 !important;
  background: var(--rx157-gold-soft) !important;
  border-color: rgba(216, 173, 89, 0.34) !important;
}

body.rx-v157 :where(.rx-btn-red, .danger-btn) {
  color: #ffd8de !important;
  background: var(--rx157-danger-soft) !important;
  border-color: rgba(239, 95, 112, 0.34) !important;
}

body.rx-v157 .rx-btn-compact {
  min-height: 36px !important;
  padding-inline: 13px !important;
  font-size: 12px !important;
}

body.rx-v157 .full {
  width: 100% !important;
}

body.rx-v157 :where(input, select, textarea) {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  color: var(--rx157-text) !important;
  caret-color: #a99bff;
  background: #0a1624 !important;
  border: 1px solid var(--rx157-border-strong) !important;
  border-radius: var(--rx157-radius-sm) !important;
  box-shadow: none !important;
  font-size: 14px !important;
  outline: 0;
}

body.rx-v157 textarea {
  min-height: 86px;
  resize: vertical;
}

body.rx-v157 :where(input, select, textarea)::placeholder {
  color: #60738b !important;
  opacity: 1 !important;
}

body.rx-v157 :where(input, select, textarea):hover:not(:disabled) {
  border-color: rgba(151, 174, 204, 0.4) !important;
}

body.rx-v157 :where(input, select, textarea):focus {
  border-color: rgba(147, 129, 255, 0.78) !important;
  box-shadow: 0 0 0 3px rgba(124, 99, 255, 0.12) !important;
}

body.rx-v157 :where(label, .rx-cashier-field) > span:first-child {
  color: var(--rx157-text-soft) !important;
  font-size: 11px !important;
  font-weight: 720 !important;
  letter-spacing: 0.02em !important;
}

body.rx-v157 .section-heading {
  width: 100% !important;
  margin: 0 0 24px !important;
  padding: 0 !important;
  display: flex !important;
  align-items: flex-end !important;
  justify-content: space-between !important;
  gap: 24px !important;
}

body.rx-v157 .section-heading > div:first-child {
  max-width: 720px;
}

body.rx-v157 .section-heading h2 {
  margin: 5px 0 7px !important;
  color: var(--rx157-text) !important;
  font-size: clamp(26px, 3vw, 38px) !important;
  font-weight: 820 !important;
  line-height: 1.08 !important;
  letter-spacing: -0.035em !important;
}

body.rx-v157 .section-heading p {
  margin: 0 !important;
  color: var(--rx157-muted) !important;
  font-size: 14px !important;
  line-height: 1.6 !important;
}

body.rx-v157 :where(.balance-card, .kyc-card, .legal-hero-panel, .compliance-status-card, .legal-doc-card, .readiness-card, .admin-surface-card, .admin-stat-card) {
  color: var(--rx157-text) !important;
  background: var(--rx157-surface) !important;
  border: 1px solid var(--rx157-border) !important;
  border-radius: var(--rx157-radius-md) !important;
  box-shadow: var(--rx157-shadow-sm) !important;
}

body.rx-v157 :where(.balance-pill, .kyc-status-pill, .admin-badge, .rx-2fa-status-badge) {
  min-height: 32px !important;
  padding: 0 11px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: var(--rx157-text-soft) !important;
  background: rgba(255, 255, 255, 0.035) !important;
  border: 1px solid var(--rx157-border) !important;
  border-radius: 999px !important;
  font-size: 11px !important;
  font-weight: 750 !important;
  box-shadow: none !important;
}

body.rx-v157 :where(.account-message, .rx-security-message, .admin-security-message, .rx-cashier-quote-status, .rx-rakeback-system-message) {
  min-height: 0 !important;
  margin: 14px 0 0 !important;
  padding: 11px 13px !important;
  color: var(--rx157-text-soft) !important;
  background: rgba(255, 255, 255, 0.035) !important;
  border: 1px solid var(--rx157-border) !important;
  border-radius: var(--rx157-radius-sm) !important;
  font-size: 12px !important;
  line-height: 1.5 !important;
}

body.rx-v157 :where(.account-message, .rx-security-message, .admin-security-message, .rx-cashier-quote-status, .rx-rakeback-system-message)[data-tone="success"] {
  color: #bdf4da !important;
  background: var(--rx157-success-soft) !important;
  border-color: rgba(33, 185, 121, 0.3) !important;
}

body.rx-v157 :where(.account-message, .rx-security-message, .admin-security-message, .rx-cashier-quote-status, .rx-rakeback-system-message)[data-tone="error"] {
  color: #ffd2d9 !important;
  background: var(--rx157-danger-soft) !important;
  border-color: rgba(239, 95, 112, 0.3) !important;
}

body.rx-v157 :where(.rx-auth-backdrop, .rx-security-backdrop, .rx-cashier-modal-backdrop, .rx-rakeback-popup-backdrop) {
  position: fixed !important;
  inset: 0 !important;
  background: rgba(2, 7, 13, 0.76) !important;
  backdrop-filter: blur(10px) !important;
}

body.rx-v157 :where(.rx-auth-modal, .rx-security-modal, .rx-rakeback-popup-modal, .rx-nlh-table-picker-panel) {
  color: var(--rx157-text) !important;
  background: #0b1827 !important;
  border: 1px solid var(--rx157-border-strong) !important;
  border-radius: var(--rx157-radius-lg) !important;
  box-shadow: var(--rx157-shadow-lg) !important;
}

body.rx-v157 :where(.rx-auth-close, .rx-security-close, .rx-rakeback-popup-close, .rx-nlh-table-picker-close, .rx-cashier-close-btn) {
  width: 38px !important;
  min-width: 38px !important;
  height: 38px !important;
  min-height: 38px !important;
  padding: 0 !important;
  display: grid !important;
  place-items: center !important;
  color: var(--rx157-text-soft) !important;
  background: rgba(255, 255, 255, 0.035) !important;
  border: 1px solid var(--rx157-border) !important;
  border-radius: 10px !important;
  box-shadow: none !important;
  font-size: 22px !important;
  line-height: 1 !important;
}

body.rx-v157 :where(.rx-auth-close, .rx-security-close, .rx-rakeback-popup-close, .rx-nlh-table-picker-close, .rx-cashier-close-btn):hover {
  color: #fff !important;
  background: var(--rx157-surface-soft) !important;
  border-color: var(--rx157-border-strong) !important;
}

body.rx-v157 :where(table, .admin-data-table, .rx-rakeback-history-table) {
  width: 100% !important;
  border-collapse: collapse !important;
  color: var(--rx157-text-soft) !important;
  font-size: 12px !important;
}

body.rx-v157 :where(table, .admin-data-table, .rx-rakeback-history-table) th {
  padding: 12px 14px !important;
  color: var(--rx157-muted) !important;
  background: rgba(255, 255, 255, 0.025) !important;
  border-bottom: 1px solid var(--rx157-border) !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  letter-spacing: 0.08em !important;
  text-align: left !important;
  text-transform: uppercase !important;
}

body.rx-v157 :where(table, .admin-data-table, .rx-rakeback-history-table) td {
  padding: 13px 14px !important;
  border-bottom: 1px solid rgba(151, 174, 204, 0.1) !important;
}

body.rx-v157 .rx-toast-stack {
  position: fixed !important;
  z-index: 2300 !important;
  inset: 84px 20px auto auto !important;
  width: min(360px, calc(100vw - 32px)) !important;
  display: grid !important;
  gap: 10px !important;
}

body.rx-v157 .rx-toast {
  overflow: hidden !important;
  color: var(--rx157-text) !important;
  background: #0d1a29 !important;
  border: 1px solid var(--rx157-border-strong) !important;
  border-radius: var(--rx157-radius-md) !important;
  box-shadow: var(--rx157-shadow-lg) !important;
}

body.rx-v157 .rx-cashier-loading-grid {
  min-height: 160px !important;
  padding: 40px 20px !important;
  display: grid !important;
  place-items: center !important;
  gap: 12px !important;
  color: var(--rx157-muted) !important;
  background: var(--rx157-surface) !important;
  border: 1px solid var(--rx157-border) !important;
  border-radius: var(--rx157-radius-md) !important;
  font-size: 13px !important;
  text-align: center !important;
}

body.rx-v157 .rx-cashier-loading-grid::before {
  width: 26px;
  height: 26px;
  content: "";
  border: 2px solid rgba(124, 99, 255, 0.2);
  border-top-color: #9f8fff;
  border-radius: 50%;
  animation: rx157-spin 750ms linear infinite;
}

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

body.rx-v157 * {
  scrollbar-width: thin;
  scrollbar-color: #31465f transparent;
}

body.rx-v157 *::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

body.rx-v157 *::-webkit-scrollbar-thumb {
  background: #31465f;
  border: 2px solid transparent;
  border-radius: 999px;
  background-clip: padding-box;
}
