/*
 * Streamer Dashboard Dark Theme
 * Matches the rollunited-frontend-v2 design system (dark mode).
 * Loaded exclusively by streamer layouts — does not affect admin panel.
 *
 * Synced with rollunited-frontend-v2 @ commit 9e2fc3c
 * Token source: app/globals.css .dark block
 */

/* ============================================================
   1. CUSTOM PROPERTIES — frontend-v2 dark palette
   ============================================================ */
:root {
  --ru-bg: oklch(0.12 0 0);
  --ru-fg: oklch(0.985 0 0);
  --ru-card: oklch(0.18 0 0);
  --ru-card-fg: oklch(0.985 0 0);
  --ru-popover: oklch(0.19 0 0);
  --ru-primary: oklch(0.96 0.17 122);
  --ru-primary-hover: oklch(0.86 0.17 122);
  --ru-primary-fg: oklch(0.12 0 0);
  --ru-secondary: oklch(0.27 0 0);
  --ru-secondary-hover: oklch(0.34 0 0);
  --ru-secondary-fg: oklch(0.985 0 0);
  --ru-muted: oklch(0.27 0 0);
  --ru-muted-fg: oklch(0.74 0 0);
  --ru-accent: oklch(0.28 0.08 122);
  --ru-accent-fg: oklch(0.985 0 0);
  --ru-border: oklch(1 0 0 / 7%);
  --ru-input: oklch(1 0 0 / 12%);
  --ru-ring: oklch(0.96 0.12 122);
  --ru-destructive: oklch(0.68 0.20 22.2);
  --ru-destructive-fg: oklch(0.99 0 0);
  --ru-success: oklch(0.75 0.18 155);
  --ru-success-fg: oklch(0.12 0 0);
  --ru-warning: oklch(0.80 0.15 85);
  --ru-warning-fg: oklch(0.12 0 0);
  --ru-info: oklch(0.70 0.12 240);
  --ru-info-fg: oklch(0.20 0 0);
  --ru-link: var(--ru-primary);
  --ru-radius: 0.625rem;
  --ru-radius-sm: calc(0.625rem - 4px);
  --ru-radius-md: calc(0.625rem - 2px);
  --ru-radius-lg: 0.625rem;
  --ru-radius-xl: calc(0.625rem + 4px);
}

/* ============================================================
   2. BOOTSTRAP VARIABLE OVERRIDES
   ============================================================ */
[data-bs-theme="dark"] {
  --bs-body-bg: var(--ru-bg);
  --bs-body-color: var(--ru-fg);
  --bs-emphasis-color: var(--ru-fg);
  --bs-primary: var(--ru-primary);
  --bs-primary-rgb: 223, 255, 121;
  --bs-secondary: var(--ru-secondary);
  --bs-secondary-rgb: 38, 38, 38;
  --bs-success: var(--ru-success);
  --bs-success-rgb: 28, 206, 121;
  --bs-danger: var(--ru-destructive);
  --bs-danger-rgb: 251, 87, 93;
  --bs-warning: var(--ru-warning);
  --bs-warning-rgb: 234, 181, 50;
  --bs-info: var(--ru-info);
  --bs-info-rgb: 79, 168, 225;
  --bs-border-color: var(--ru-border);
  --bs-card-bg: var(--ru-card);
  --bs-card-color: var(--ru-card-fg);
  --bs-card-border-color: var(--ru-border);
  --bs-card-cap-bg: transparent;
  --bs-tertiary-bg: var(--ru-secondary);
  --bs-link-color: var(--ru-link);
  --bs-link-hover-color: var(--ru-primary-hover);
  color-scheme: dark;
}

/* ============================================================
   3. TYPOGRAPHY
   ============================================================ */
html, body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, .h1, .h2, .h3 {
  font-family: 'DM Sans', 'Inter', sans-serif;
  font-weight: 700;
  letter-spacing: -0.01em;
}

@media (max-width: 767.98px) {
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="url"],
  input[type="number"],
  input[type="date"],
  select,
  textarea {
    font-size: 16px !important;
  }
}

h4, h5, h6, .h4, .h5, .h6 {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
}

/* ============================================================
   4. BASE / BODY
   ============================================================ */
html {
  height: 100%;
}

body {
  height: 100%;
  background-color: var(--ru-bg);
  color: var(--ru-fg);
}

a {
  color: var(--ru-link);
  text-decoration: none;
}

a:hover {
  color: var(--ru-primary-hover);
}

::selection {
  background: var(--ru-primary);
  color: var(--ru-primary-fg);
}

/* ============================================================
   5. SIDEBAR
   ============================================================ */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 250px;
  background-color: var(--ru-card);
  border-right: 1px solid var(--ru-border);
  display: flex;
  flex-direction: column;
  z-index: 1040;
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-inner {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1rem;
  border-bottom: 1px solid var(--ru-border);
  flex-shrink: 0;
}

.sidebar-brand {
  font-family: 'DM Sans', 'Inter', sans-serif;
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--ru-fg) !important;
  text-decoration: none;
}

.sidebar-brand:hover {
  color: var(--ru-primary) !important;
}

.sidebar-logo {
  height: 22px;
  width: auto;
  display: block;
}

.sidebar-close {
  background: none;
  border: none;
  color: var(--ru-muted-fg);
  font-size: 1.125rem;
  padding: 0.25rem;
  cursor: pointer;
  line-height: 1;
}

.sidebar-close:hover {
  color: var(--ru-fg);
}

.sidebar-nav {
  flex: 1;
  padding: 0.75rem 0.625rem;
}

.sidebar-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ru-muted-fg);
  text-decoration: none;
  border-radius: var(--ru-radius-md);
  transition: color 0.15s ease, background-color 0.15s ease;
}

.sidebar-link i {
  width: 18px;
  text-align: center;
  font-size: 0.875rem;
  flex-shrink: 0;
}

.sidebar-link:hover,
.sidebar-link:focus {
  color: var(--ru-fg);
  background-color: var(--ru-secondary);
}

.sidebar-link.active {
  color: var(--ru-primary);
  background-color: var(--ru-accent);
}

.sidebar-link.disabled,
.sidebar-link.disabled:hover,
.sidebar-link.disabled:focus,
.sidebar-link.disabled:focus-visible {
  opacity: 0.42;
  color: var(--ru-muted-fg);
  background-color: transparent;
  pointer-events: none;
  cursor: not-allowed;
  filter: grayscale(0.35);
}

.sidebar-link.disabled i {
  color: inherit;
  opacity: 0.85;
}

/* --- Sidebar dropdown --- */
.sidebar-dropdown-toggle {
  cursor: pointer;
}

.sidebar-dropdown-arrow {
  font-size: 0.65rem;
  transition: transform 0.2s ease;
}

.sidebar-dropdown.open .sidebar-dropdown-arrow {
  transform: rotate(180deg);
}

.sidebar-submenu {
  display: none;
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-submenu .sidebar-link {
  padding-left: 2.5rem;
  font-size: 0.8125rem;
}

/* --- Section labels --- */
.sidebar-section-label {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--ru-muted-fg);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.75rem 0.75rem 0.375rem;
}

/* --- Your page card (profile page) --- */
.your-page-card {
  background-color: var(--ru-card);
  border: 1px solid var(--ru-border);
  border-radius: var(--ru-radius-lg);
  overflow: hidden;
}

.your-page-card-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
}

.your-page-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  flex: 1;
}

.your-page-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--ru-radius-md);
  background-color: var(--ru-accent);
  color: var(--ru-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  flex-shrink: 0;
}

.your-page-detail {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.your-page-label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ru-muted-fg);
  line-height: 1.3;
}

.your-page-url {
  font-size: 0.875rem;
  color: var(--ru-primary);
  background: none;
  padding: 0;
  user-select: all;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.4;
}

.your-page-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.your-page-copy-btn.copied {
  border-color: var(--ru-success) !important;
  color: var(--ru-success) !important;
}

@media (max-width: 575.98px) {
  .your-page-card-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .your-page-actions {
    justify-content: stretch;
  }

  .your-page-actions .btn {
    flex: 1;
  }
}

/* --- Sidebar footer --- */
.sidebar-footer {
  margin-top: auto;
  border-top: 1px solid var(--ru-border);
  padding: 0.625rem;
  flex-shrink: 0;
}

.sidebar-user-card {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.375rem 0.25rem;
}

.sidebar-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--ru-primary);
  color: var(--ru-primary-fg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8125rem;
  font-weight: 700;
  flex-shrink: 0;
}

.sidebar-user-detail {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.sidebar-user-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ru-fg);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.3;
}

.sidebar-user-role {
  font-size: 0.6875rem;
  color: var(--ru-muted-fg);
  line-height: 1.3;
}

.sidebar-user-menu-btn {
  background: none;
  border: none;
  color: var(--ru-muted-fg);
  font-size: 0.875rem;
  padding: 0.25rem 0.5rem;
  border-radius: var(--ru-radius-sm);
  cursor: pointer;
  transition: color 0.15s ease, background-color 0.15s ease;
  flex-shrink: 0;
}

.sidebar-user-menu-btn:hover {
  color: var(--ru-fg);
  background-color: var(--ru-secondary);
}

/* --- Mobile topbar (visible below lg) --- */
.sidebar-mobile-topbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background-color: var(--ru-card);
  border-bottom: 1px solid var(--ru-border);
  position: sticky;
  top: 0;
  z-index: 1030;
}

.sidebar-hamburger {
  background: none;
  border: 1px solid var(--ru-border);
  color: var(--ru-fg);
  font-size: 1rem;
  padding: 0.375rem 0.5rem;
  border-radius: var(--ru-radius-sm);
  cursor: pointer;
  line-height: 1;
}

.sidebar-hamburger:hover {
  background-color: var(--ru-secondary);
}

.sidebar-mobile-brand {
  font-family: 'DM Sans', 'Inter', sans-serif;
  font-weight: 700;
  font-size: 1.0625rem;
  color: var(--ru-fg) !important;
  text-decoration: none;
}

.sidebar-mobile-brand:hover {
  color: var(--ru-primary) !important;
}

/* --- Sidebar backdrop (mobile) --- */
.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1035;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.sidebar-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

/* --- Responsive: hide sidebar on mobile, show on lg+ --- */
@media (max-width: 991.98px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.25s ease;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
  }
}

@media (min-width: 992px) {
  .sidebar-mobile-topbar {
    display: none !important;
  }

  .sidebar-close {
    display: none !important;
  }

  .main-content {
    margin-left: 250px;
  }
}

body.sidebar-open {
  overflow: hidden;
}

/* ============================================================
   6. CARDS
   ============================================================ */
.card {
  background-color: var(--ru-card);
  border: 1px solid var(--ru-border);
  border-radius: 0.75rem;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  color: var(--ru-card-fg);
}

.card-header {
  background-color: transparent;
  border-bottom: 1px solid var(--ru-border);
  padding: 1rem 1.5rem;
  font-weight: 600;
}

.card-header h5,
.card-header .h5 {
  margin-bottom: 0;
  font-size: 1rem;
}

.card-body {
  padding: 1.5rem;
}

/* ============================================================
   7. BUTTONS
   ============================================================ */
.btn {
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--ru-radius-md);
  padding: 0.5rem 1rem;
  transition: all 0.15s ease;
  border: 1px solid transparent;
}

.btn:active {
  opacity: 0.9;
}

.btn-primary {
  background-color: var(--ru-primary) !important;
  color: var(--ru-primary-fg) !important;
  border-color: var(--ru-primary) !important;
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--ru-primary-hover) !important;
  border-color: var(--ru-primary-hover) !important;
  color: var(--ru-primary-fg) !important;
}

.btn-secondary {
  background-color: var(--ru-secondary) !important;
  color: var(--ru-secondary-fg) !important;
  border-color: var(--ru-border) !important;
}

.btn-secondary:hover,
.btn-secondary:focus {
  background-color: var(--ru-secondary-hover) !important;
  color: var(--ru-secondary-fg) !important;
}

.btn-danger {
  background-color: var(--ru-destructive) !important;
  color: var(--ru-destructive-fg) !important;
  border-color: var(--ru-destructive) !important;
}

.btn-danger:hover,
.btn-danger:focus {
  opacity: 0.9;
}

.btn-success {
  background-color: var(--ru-success) !important;
  color: var(--ru-success-fg) !important;
  border-color: var(--ru-success) !important;
}

.btn-success:hover,
.btn-success:focus {
  opacity: 0.9;
}

.btn-warning {
  background-color: var(--ru-warning) !important;
  color: var(--ru-warning-fg) !important;
  border-color: var(--ru-warning) !important;
}

.btn-warning:hover,
.btn-warning:focus {
  opacity: 0.9;
}

.btn-outline-primary {
  color: var(--ru-primary) !important;
  border-color: var(--ru-primary) !important;
  background-color: transparent !important;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
  background-color: var(--ru-primary) !important;
  color: var(--ru-primary-fg) !important;
}

.btn-outline-secondary {
  color: var(--ru-muted-fg) !important;
  border-color: var(--ru-border) !important;
  background-color: transparent !important;
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus {
  background-color: var(--ru-secondary) !important;
  color: var(--ru-fg) !important;
}

.btn-outline-danger {
  color: var(--ru-destructive) !important;
  border-color: var(--ru-destructive) !important;
  background-color: transparent !important;
}

.btn-outline-danger:hover,
.btn-outline-danger:focus {
  background-color: var(--ru-destructive) !important;
  color: var(--ru-destructive-fg) !important;
}

.btn-close {
  filter: invert(1) grayscale(100%) brightness(200%);
}

/* Focus ring for all buttons */
.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--ru-bg), 0 0 0 4px var(--ru-ring);
}

/* ============================================================
   8. FORMS
   ============================================================ */
.form-control,
.form-select {
  background-color: var(--ru-input);
  border: 1px solid var(--ru-border);
  color: var(--ru-fg);
  border-radius: var(--ru-radius-md);
  font-size: 0.875rem;
  padding: 0.5rem 0.75rem;
  height: auto;
  min-height: 2.25rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus,
.form-select:focus {
  background-color: var(--ru-input);
  border-color: var(--ru-ring);
  color: var(--ru-fg);
  box-shadow: 0 0 0 2px oklch(0.96 0.12 122 / 0.3);
}

.form-control::placeholder {
  color: var(--ru-muted-fg);
  opacity: 0.6;
}

/* Windows-native <select> popups don't fully honor color-scheme: dark.
   Without explicit option colors, white text inherited from the select
   ends up rendered on a white OS background -> invisible options. */
.form-control option,
.form-select option {
  background-color: var(--ru-popover);
  color: var(--ru-fg);
}

.form-control optgroup,
.form-select optgroup {
  background-color: var(--ru-popover);
  color: var(--ru-muted-fg);
}

.form-control:disabled,
.form-control[readonly],
.form-select:disabled {
  background-color: var(--ru-secondary);
  color: var(--ru-muted-fg);
  opacity: 0.7;
  cursor: not-allowed;
}

.input-group-locked .form-control:disabled {
  border-right: 0;
}

.input-group-locked .input-group-text-locked {
  background-color: var(--ru-secondary);
  color: var(--ru-muted-fg);
  border-color: var(--ru-border);
  cursor: not-allowed;
  opacity: 0.7;
}

.form-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ru-fg);
  margin-bottom: 0.375rem;
}

.col-form-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ru-fg);
}

.form-text {
  color: var(--ru-muted-fg);
  font-size: 0.8125rem;
}

.form-check-input {
  background-color: var(--ru-input);
  border-color: var(--ru-border);
}

.form-check-input:checked {
  background-color: var(--ru-primary);
  border-color: var(--ru-primary);
}

.form-check-input:checked[type="checkbox"]:not([role="switch"]) {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23000' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10l3 3l6-6'/%3e%3c/svg%3e");
}

.form-check-input:checked[type="radio"] {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='2' fill='%23000'/%3e%3c/svg%3e");
}

.form-check-input:focus {
  box-shadow: 0 0 0 2px oklch(0.96 0.12 122 / 0.3);
  border-color: var(--ru-ring);
}

.form-check-label {
  color: var(--ru-fg);
  font-size: 0.875rem;
}

/* Floating labels */
.form-floating > .form-control,
.form-floating > .form-select {
  background-color: var(--ru-input);
  border-color: var(--ru-border);
  color: var(--ru-fg);
  border-radius: var(--ru-radius-md);
}

.form-floating > label {
  color: var(--ru-muted-fg);
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
  color: var(--ru-muted-fg);
}

/* Validation */
.is-invalid {
  border-color: var(--ru-destructive) !important;
}

.invalid-feedback {
  color: var(--ru-destructive);
  font-size: 0.8125rem;
}

/* Input groups */
.input-group-text {
  background-color: var(--ru-secondary);
  border-color: var(--ru-border);
  color: var(--ru-muted-fg);
  font-size: 0.875rem;
}

/* ============================================================
   9. TABLES
   ============================================================ */
.table {
  --bs-table-bg: transparent;
  --bs-table-color: var(--ru-fg);
  --bs-table-border-color: var(--ru-border);
  --bs-table-striped-bg: var(--ru-secondary);
  --bs-table-hover-bg: oklch(1 0 0 / 0.04);
  font-size: 0.875rem;
  margin-bottom: 0;
}

.table > thead > tr > th {
  font-weight: 600;
  color: var(--ru-fg);
  font-size: 0.8125rem;
  text-transform: none;
  padding: 0.75rem;
  border-bottom-width: 1px;
  border-bottom-color: var(--ru-border);
  background-color: transparent;
}

.table > tbody > tr > td,
.table > tbody > tr > th {
  padding: 0.75rem;
  vertical-align: middle;
  border-bottom: 1px solid var(--ru-border);
  color: var(--ru-fg);
}

.table > tbody > tr:last-child > td,
.table > tbody > tr:last-child > th {
  border-bottom: none;
}

.table-hover > tbody > tr:hover {
  --bs-table-hover-bg: oklch(1 0 0 / 0.04);
  background-color: oklch(1 0 0 / 0.04);
}

/* Override striped to be subtler */
.table-striped > tbody > tr:nth-of-type(odd) {
  --bs-table-striped-bg: oklch(1 0 0 / 0.02);
}

.table-responsive {
  border-radius: var(--ru-radius-md);
}

/* ============================================================
   10. ALERTS
   ============================================================ */
.alert {
  border-radius: var(--ru-radius-lg);
  font-size: 0.875rem;
  border-width: 1px;
}

.alert-danger {
  background-color: oklch(0.68 0.20 22.2 / 0.12);
  border-color: oklch(0.68 0.20 22.2 / 0.25);
  color: oklch(0.85 0.12 22);
}

.alert-success {
  background-color: oklch(0.75 0.18 155 / 0.12);
  border-color: oklch(0.75 0.18 155 / 0.25);
  color: oklch(0.85 0.10 155);
}

.alert-warning {
  background-color: oklch(0.80 0.15 85 / 0.12);
  border-color: oklch(0.80 0.15 85 / 0.25);
  color: oklch(0.88 0.10 85);
}

.alert-info {
  background-color: oklch(0.70 0.12 240 / 0.12);
  border-color: oklch(0.70 0.12 240 / 0.25);
  color: oklch(0.82 0.08 240);
}

.alert .btn-close {
  filter: invert(1) grayscale(100%) brightness(200%);
}

.alert a {
  color: inherit;
  text-decoration: underline;
}

/* ============================================================
   11. BADGES
   ============================================================ */
.badge {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.25rem 0.5rem;
  border-radius: var(--ru-radius-md);
  border: 1px solid transparent;
}

.bg-primary {
  background-color: var(--ru-primary) !important;
  color: var(--ru-primary-fg) !important;
}

.bg-secondary {
  background-color: var(--ru-secondary) !important;
  color: var(--ru-secondary-fg) !important;
  border-color: var(--ru-border) !important;
}

.bg-success {
  background-color: var(--ru-success) !important;
  color: var(--ru-success-fg) !important;
}

.bg-danger {
  background-color: var(--ru-destructive) !important;
  color: var(--ru-destructive-fg) !important;
}

.bg-warning {
  background-color: var(--ru-warning) !important;
  color: var(--ru-warning-fg) !important;
}

.bg-info {
  background-color: var(--ru-info) !important;
  color: var(--ru-info-fg) !important;
}

/* ============================================================
   12. MODALS
   ============================================================ */
.modal-content {
  background-color: var(--ru-card);
  border: 1px solid var(--ru-border);
  border-radius: 1rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  color: var(--ru-card-fg);
}

.modal-header {
  border-bottom: 1px solid var(--ru-border);
  padding: 1.25rem 1.5rem;
}

.modal-header .modal-title {
  font-size: 1.125rem;
  font-weight: 600;
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  border-top: 1px solid var(--ru-border);
  padding: 1rem 1.5rem;
}

.modal-backdrop.show {
  opacity: 0.6;
}

/* Card header with bg-warning override for dark theme */
.card-header.bg-warning {
  background-color: oklch(0.80 0.15 85 / 0.15) !important;
  color: oklch(0.88 0.10 85) !important;
  border-bottom-color: oklch(0.80 0.15 85 / 0.25);
}

/* ============================================================
   13. DROPDOWNS
   ============================================================ */
.dropdown-menu {
  background-color: var(--ru-popover);
  border: 1px solid var(--ru-border);
  border-radius: var(--ru-radius-md);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  padding: 0.25rem;
}

.dropdown-item {
  color: var(--ru-fg);
  font-size: 0.875rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--ru-radius-sm);
}

.dropdown-item:hover,
.dropdown-item:focus {
  background-color: var(--ru-accent);
  color: var(--ru-fg);
}

.dropdown-divider {
  border-top-color: var(--ru-border);
}

/* ============================================================
   14. PAGINATION
   ============================================================ */
.pagination {
  gap: 0.25rem;
}

.page-link {
  background-color: transparent;
  border: 1px solid var(--ru-border);
  color: var(--ru-fg);
  font-size: 0.875rem;
  border-radius: var(--ru-radius-md) !important;
  padding: 0.375rem 0.75rem;
}

.page-link:hover {
  background-color: var(--ru-secondary);
  border-color: var(--ru-border);
  color: var(--ru-fg);
}

.page-item.active .page-link {
  background-color: var(--ru-primary);
  border-color: var(--ru-primary);
  color: var(--ru-primary-fg);
}

.page-item.disabled .page-link {
  background-color: transparent;
  border-color: var(--ru-border);
  color: var(--ru-muted-fg);
  opacity: 0.5;
}

/* ============================================================
   15. CHIP SELECT (streamer component)
   ============================================================ */
.chip-select-item {
  transition: all 0.15s ease;
}

.chip-select-item.bg-light {
  background-color: var(--ru-secondary) !important;
  color: var(--ru-fg) !important;
  border-color: var(--ru-border) !important;
}

.chip-select-item.text-dark {
  color: var(--ru-fg) !important;
}

.chip-select-item.bg-primary {
  background-color: var(--ru-primary) !important;
  color: var(--ru-primary-fg) !important;
  border-color: var(--ru-primary) !important;
}

.chip-select-item.text-white {
  color: var(--ru-primary-fg) !important;
}

/* ============================================================
   16. UTILITY OVERRIDES
   ============================================================ */
.text-muted {
  color: var(--ru-muted-fg) !important;
}

.text-danger {
  color: var(--ru-destructive) !important;
}

.text-success {
  color: var(--ru-success) !important;
}

.border {
  border-color: var(--ru-border) !important;
}

hr {
  border-color: var(--ru-border);
  opacity: 1;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--ru-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--ru-secondary);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--ru-muted-fg);
}

/* ============================================================
   17. LAYOUT
   ============================================================ */
.main-content {
  min-height: 100vh;
}

.main-content-inner {
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
  padding: 1.25rem 1rem;
}

@media (min-width: 576px) {
  .main-content-inner {
    padding: 1.5rem;
  }
}

@media (min-width: 1200px) {
  .main-content-inner {
    padding: 1.5rem 2rem;
  }
}

/* ============================================================
   18. LOGIN / REGISTER / AUTH PAGES
   ============================================================ */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background-color: var(--ru-card);
  border: 1px solid var(--ru-border);
  border-radius: 1rem;
  padding: 2.5rem 2rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.auth-card.auth-card-wide {
  max-width: 480px;
}

.auth-logo {
  height: 26px;
  width: auto;
  max-width: 100%;
  margin-bottom: 0.75rem;
  display: inline-block;
}

.auth-subtitle {
  font-size: 0.875rem;
  color: var(--ru-muted-fg);
  margin-bottom: 1.75rem;
}

.auth-card .form-floating {
  margin-bottom: 0.75rem;
}

.auth-card .form-floating > .form-control {
  background-color: var(--ru-input);
  border-color: var(--ru-border);
  color: var(--ru-fg);
  border-radius: var(--ru-radius-md);
  height: 3.25rem;
}

.auth-card .form-floating > .form-control:focus {
  border-color: var(--ru-ring);
  box-shadow: 0 0 0 2px oklch(0.96 0.12 122 / 0.3);
}

.auth-card .form-floating > label {
  color: var(--ru-muted-fg);
  font-size: 0.875rem;
}

.auth-card .btn-primary {
  height: 2.75rem;
  font-size: 0.9375rem;
  font-weight: 600;
}

.auth-links {
  margin-top: 1.25rem;
  font-size: 0.875rem;
}

.auth-links a {
  color: var(--ru-muted-fg);
  transition: color 0.15s ease;
}

.auth-links a:hover {
  color: var(--ru-primary);
}

.auth-divider {
  color: var(--ru-muted-fg);
  font-size: 0.8125rem;
  margin: 0 0.5rem;
}

/* ============================================================
   19. TOOLTIP OVERRIDES
   ============================================================ */
.tooltip {
  font-size: 0.8125rem;
}

.tooltip-inner {
  background-color: var(--ru-popover);
  border: 1px solid var(--ru-border);
  border-radius: var(--ru-radius-md);
  color: var(--ru-fg);
  padding: 0.5rem 0.75rem;
}

.bs-tooltip-top .tooltip-arrow::before,
.bs-tooltip-auto[data-popper-placement^="top"] .tooltip-arrow::before {
  border-top-color: var(--ru-popover);
}

.bs-tooltip-bottom .tooltip-arrow::before,
.bs-tooltip-auto[data-popper-placement^="bottom"] .tooltip-arrow::before {
  border-bottom-color: var(--ru-popover);
}

.bs-tooltip-start .tooltip-arrow::before,
.bs-tooltip-auto[data-popper-placement^="left"] .tooltip-arrow::before {
  border-left-color: var(--ru-popover);
}

.bs-tooltip-end .tooltip-arrow::before,
.bs-tooltip-auto[data-popper-placement^="right"] .tooltip-arrow::before {
  border-right-color: var(--ru-popover);
}

/* ============================================================
   20. CONTACT METHOD RADIO SELECTOR
   ============================================================ */
.contact-method-group {
  margin-bottom: 1rem;
}

.contact-method-group .form-label {
  font-size: 0.8125rem;
  color: var(--ru-muted-fg);
}

.contact-method-option {
  cursor: pointer;
}

.contact-method-option input[type="radio"] {
  display: none;
}

.contact-method-label {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0.25rem 0.625rem;
  min-height: 34px;
  line-height: 1.2;
  border: 1px solid var(--ru-border);
  border-radius: var(--ru-radius-md);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ru-muted-fg);
  background-color: transparent;
  transition: all 0.15s ease;
}

.contact-method-option input[type="radio"]:checked + .contact-method-label {
  border-color: var(--ru-primary);
  color: var(--ru-primary);
  background-color: oklch(0.96 0.17 122 / 0.1);
}

.contact-method-option:hover .contact-method-label {
  border-color: var(--ru-muted-fg);
  color: var(--ru-fg);
}

/* ============================================================
   21. BTN-GROUP OVERRIDES
   ============================================================ */
.btn-group > .btn {
  border-radius: 0;
}

.btn-group > .btn:first-child {
  border-top-left-radius: var(--ru-radius-md);
  border-bottom-left-radius: var(--ru-radius-md);
}

.btn-group > .btn:last-child,
.btn-group > .dropdown-toggle {
  border-top-right-radius: var(--ru-radius-md);
  border-bottom-right-radius: var(--ru-radius-md);
}

/* ============================================================
   22. SHADOW CARD (force-change-password)
   ============================================================ */
.shadow-lg {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4) !important;
}

/* ============================================================
   23. PROFILE PAGE
   ============================================================ */
.profile-page .card-header {
  font-weight: 600;
  font-size: 0.9375rem;
  letter-spacing: 0.01em;
}

.profile-page .card-header i {
  color: var(--ru-muted-fg);
  font-size: 0.875rem;
}

.profile-page .form-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ru-muted-fg);
  margin-bottom: 0.375rem;
}

.profile-avatar-lg {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  overflow: hidden;
  background-color: var(--ru-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.profile-avatar-lg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-avatar-lg span {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ru-primary-fg);
}

.badge-status-active {
  background-color: oklch(0.75 0.18 155 / 0.15);
  color: var(--ru-success);
  font-weight: 500;
  font-size: 0.75rem;
  padding: 0.3em 0.75em;
  border-radius: 999px;
}

.badge-status-inactive {
  background-color: oklch(0.80 0.15 85 / 0.15);
  color: var(--ru-warning);
  font-weight: 500;
  font-size: 0.75rem;
  padding: 0.3em 0.75em;
  border-radius: 999px;
}

.profile-avatar-preview {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto;
  border: 2px solid var(--ru-border);
}

.profile-avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-avatar-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--ru-muted);
  color: var(--ru-muted-fg);
  font-size: 1.5rem;
}

.profile-thumbnail-preview {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--ru-radius-md);
  overflow: hidden;
  border: 2px dashed var(--ru-border);
}

.profile-thumbnail-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-thumbnail-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background-color: var(--ru-muted);
  color: var(--ru-muted-fg);
  font-size: 1.5rem;
}

.profile-thumbnail-placeholder small {
  font-size: 0.75rem;
}

/* ============================================================
   24. PAGE HEADER & EMPTY STATES
   ============================================================ */
.page-header {
  flex-wrap: wrap;
  gap: 0.75rem;
}

.page-header p {
  font-size: 0.8125rem;
}

.empty-state {
  text-align: center;
  padding: 4rem 1.5rem;
  color: var(--ru-muted-fg);
}

.empty-state > i {
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
  opacity: 0.3;
  display: block;
}

.empty-state h6 {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--ru-fg);
  margin-bottom: 0.25rem;
}

.empty-state p {
  font-size: 0.8125rem;
  margin-bottom: 1.25rem;
}

.empty-state .btn {
  font-size: 0.8125rem;
  padding: 0.3rem 0.875rem;
}

/* --- Coming soon state (payouts) --- */
.payouts-coming-soon {
  text-align: center;
  padding: 3rem 1.5rem;
  max-width: 480px;
  margin: 0 auto;
}

.payouts-coming-soon-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background-color: var(--ru-accent);
  color: var(--ru-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin: 0 auto 1.25rem;
}

.payouts-coming-soon p {
  font-size: 0.875rem;
  line-height: 1.6;
}

.payouts-coming-soon a {
  color: var(--ru-primary);
  font-weight: 500;
}

.card-body.p-0 .table th,
.card-body.p-0 .table td {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.card-footer {
  background-color: transparent;
  border-top: 1px solid var(--ru-border);
  padding: 0.75rem 1rem;
}

/* ============================================================
   25. STAT CARDS (Statistics page)
   ============================================================ */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

@media (max-width: 991.98px) {
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 575.98px) {
  .stat-grid {
    grid-template-columns: 1fr;
  }
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background-color: var(--ru-card);
  border: 1px solid var(--ru-border);
  border-radius: var(--ru-radius-lg);
  padding: 1.25rem 1rem;
}

.stat-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--ru-radius-md);
  background-color: var(--ru-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--ru-muted-fg);
  font-size: 0.9375rem;
}

.stat-content {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.stat-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--ru-muted-fg);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.stat-value {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--ru-fg);
  line-height: 1.2;
  font-family: 'DM Sans', 'Inter', sans-serif;
}

.collapse-chevron {
  transition: transform 0.2s ease;
  font-size: 0.75rem;
}

[aria-expanded="true"] .collapse-chevron {
  transform: rotate(180deg);
}

.stat-card-disabled {
  opacity: 0.4;
  pointer-events: none;
  position: relative;
}

.card-disabled {
  opacity: 0.4;
  pointer-events: none;
}

.stat-grid.stat-grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1199.98px) {
  .stat-grid.stat-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 575.98px) {
  .stat-grid.stat-grid-4 {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   26. PAYOUT METHOD SELECTOR
   ============================================================ */
.payout-method-option {
  cursor: pointer;
  padding: 0.75rem;
  border: 1px solid var(--ru-border);
  border-radius: var(--ru-radius-md);
  transition: border-color 0.15s ease;
}

.payout-method-option:hover,
.payout-method-option:focus-within {
  border-color: var(--ru-muted-fg);
  outline: 2px solid transparent;
}

.payout-method-option input[type="radio"] {
  display: none;
}

.payout-method-radio {
  width: 18px;
  height: 18px;
  border: 2px solid var(--ru-border);
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
  transition: border-color 0.15s ease;
}

.payout-method-option input[type="radio"]:checked ~ .payout-method-radio,
.payout-method-option input[type="radio"]:focus ~ .payout-method-radio {
  border-color: var(--ru-primary);
}

.payout-method-option input[type="radio"]:checked ~ .payout-method-radio::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--ru-primary);
}

.payout-method-option input[type="radio"]:checked ~ * {
  color: var(--ru-fg);
}

/* ============================================================
   27. DEAL & OFFER CARDS
   ============================================================ */
.deal-card,
.offer-card {
  transition: border-color 0.15s ease;
}

.deal-card:hover,
.offer-card:hover {
  border-color: var(--ru-muted-fg);
}

.deal-icon,
.offer-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--ru-radius-md);
  background-color: var(--ru-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--ru-muted-fg);
  font-size: 0.9375rem;
}

.offer-icon:has(img) {
  background-color: transparent;
  overflow: hidden;
}

.offer-card-declined {
  opacity: 0.55;
}

.deal-dates {
  border-top: 1px solid var(--ru-border);
  padding-top: 0.75rem;
  margin-top: 0.25rem;
}

.deal-card-placeholder {
  border-style: dashed;
  border-color: var(--ru-border);
  background-color: transparent;
  min-height: 200px;
}

.deal-placeholder-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px dashed var(--ru-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ru-muted-fg);
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

/* ============================================================
   28. SUPPORT PAGE
   ============================================================ */
.support-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: var(--ru-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--ru-primary-fg);
}

.support-detail-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.support-detail {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.support-detail > i {
  width: 20px;
  text-align: center;
  color: var(--ru-muted-fg);
  margin-top: 0.2rem;
  flex-shrink: 0;
}

.support-detail a {
  color: var(--ru-primary);
  text-decoration: none;
}

.support-detail a:hover {
  text-decoration: underline;
}

.support-contact-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  border: 1px solid var(--ru-border);
  border-radius: var(--ru-radius-md);
  text-decoration: none;
  color: var(--ru-fg);
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.support-contact-card:hover {
  border-color: var(--ru-primary);
  background-color: oklch(0.96 0.17 122 / 0.05);
  color: var(--ru-fg);
}

.support-contact-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--ru-radius-md);
  background-color: var(--ru-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--ru-muted-fg);
}

.accordion-item {
  background-color: transparent;
  border-color: var(--ru-border);
}

.accordion-button {
  background-color: transparent;
  color: var(--ru-fg);
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: none;
}

.accordion-button:not(.collapsed) {
  background-color: var(--ru-accent);
  color: var(--ru-fg);
  box-shadow: none;
}

.accordion-button::after {
  filter: invert(1) grayscale(100%) brightness(200%);
}

.accordion-body {
  border-top: 1px solid var(--ru-border);
}

/* ============================================================
   29. FLASH TOASTS
   ============================================================ */
.flash-toast {
  min-width: 300px;
  max-width: 420px;
  border: 1px solid var(--ru-border);
  border-radius: var(--ru-radius-md);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.flash-toast .toast-body {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.flash-toast-icon {
  font-size: 1rem;
  flex-shrink: 0;
}

.flash-toast-text {
  flex: 1;
  min-width: 0;
}

.flash-toast .btn-close {
  filter: invert(1) grayscale(100%) brightness(200%);
  font-size: 0.625rem;
  opacity: 0.5;
  flex-shrink: 0;
  padding: 0;
}

.flash-toast .btn-close:hover {
  opacity: 1;
}

.flash-toast-progress {
  height: 3px;
  background-color: currentColor;
  opacity: 0.3;
  animation: toastProgress 4s linear forwards;
}

@keyframes toastProgress {
  from { width: 100%; }
  to { width: 0%; }
}

.flash-toast-success {
  background-color: oklch(0.16 0.03 155);
  border-color: oklch(0.75 0.18 155 / 0.3);
  color: oklch(0.85 0.10 155);
}

.flash-toast-danger {
  background-color: oklch(0.16 0.03 22);
  border-color: oklch(0.68 0.20 22.2 / 0.3);
  color: oklch(0.85 0.12 22);
}

.flash-toast-warning {
  background-color: oklch(0.16 0.03 85);
  border-color: oklch(0.80 0.15 85 / 0.3);
  color: oklch(0.88 0.10 85);
}

.flash-toast-info {
  background-color: oklch(0.16 0.02 240);
  border-color: oklch(0.70 0.12 240 / 0.3);
  color: oklch(0.82 0.08 240);
}

/* ============================================================
   27. DEAL SPLIT DISPLAY
   ============================================================ */
.deal-split-number {
  font-size: 4rem;
  font-weight: 700;
  line-height: 1;
  color: var(--ru-fg);
}

.deal-split-pct {
  font-size: 2rem;
  font-weight: 600;
  color: var(--ru-primary);
  vertical-align: super;
  margin-left: 2px;
}

.deal-split-x {
  font-size: 1.75rem;
  font-weight: 300;
  color: var(--ru-muted);
}

/* ============================================================
   28. FORM TOGGLE SWITCH
   ============================================================ */
.form-switch .form-check-input {
  width: 2.5rem;
  height: 1.25rem;
  background-color: var(--ru-border);
  border: none;
  cursor: pointer;
}

.form-switch .form-check-input:checked {
  background-color: var(--ru-primary);
}

.form-switch .form-check-input:focus {
  box-shadow: 0 0 0 0.2rem rgba(124, 58, 237, 0.25);
  border: none;
}

.form-switch .form-check-label {
  padding-top: 0.1rem;
  margin-left: 0.25rem;
}

/* ============================================================
   29. SETTINGS MEDIA PREVIEWS
   ============================================================ */
.settings-avatar-preview {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--ru-accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.settings-avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.settings-avatar-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ru-muted-fg);
  font-size: 1.25rem;
}

.settings-thumbnail-preview {
  width: 96px;
  height: 54px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--ru-accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.settings-thumbnail-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.settings-thumbnail-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ru-muted-fg);
  font-size: 1rem;
}

/* ============================================================
   AFFILIATION DASHBOARD
   ============================================================ */
.affiliation-dashboard {
  min-height: 200px;
}

.affiliation-dashboard-loading {
  pointer-events: none;
}

.affiliation-dashboard-loading .metric-card {
  opacity: 0.55;
  transition: opacity 0.15s ease;
}

.affiliation-dashboard-loading-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  background: rgba(0, 0, 0, 0.15);
  border-radius: var(--ru-radius-lg);
}

.metric-card .metric-card-label {
  letter-spacing: 0.04em;
}

.metric-card .metric-card-currency {
  display: inline-block;
  min-width: 2.5rem;
}

.metric-card .metric-card-icon {
  font-size: 0.875rem;
  opacity: 0.7;
}

.metric-card .card-body {
  padding: 1rem 1.125rem;
}

.affiliation-charts-controls .form-select-sm {
  min-width: 5.5rem;
}

.affiliation-chart-canvas {
  position: relative;
  height: 280px;
}

@media (min-width: 1200px) {
  .affiliation-chart-canvas {
    height: 320px;
  }
}

/* ============================================================
   30. STREAMER REGISTER WIZARD (ROL-207)
   ============================================================ */
.register-wizard {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
}

.register-wizard-tagline {
  font-size: 0.875rem;
  color: var(--ru-muted-fg);
  margin-bottom: 1.5rem;
}

.register-progress {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  margin-bottom: 1.5rem;
  padding: 0 0.25rem;
}

.register-progress-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.375rem;
  min-width: 3.5rem;
  flex: 0 0 auto;
}

.register-progress-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: 1px solid var(--ru-border);
  background-color: var(--ru-secondary);
  color: var(--ru-muted-fg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9375rem;
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.register-progress-item.is-active .register-progress-icon {
  border-color: var(--ru-primary);
  background-color: oklch(0.96 0.17 122 / 0.12);
  color: var(--ru-primary);
  box-shadow: 0 0 0 2px oklch(0.96 0.12 122 / 0.25);
}

.register-progress-item.is-complete .register-progress-icon {
  border-color: var(--ru-primary);
  background-color: var(--ru-primary);
  color: var(--ru-primary-fg);
}

.register-progress-label {
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ru-muted-fg);
  line-height: 1.2;
}

.register-progress-item.is-active .register-progress-label,
.register-progress-item.is-complete .register-progress-label {
  color: var(--ru-fg);
}

.register-progress-line {
  flex: 1 1 auto;
  height: 1px;
  min-width: 0.75rem;
  max-width: 2rem;
  margin-top: 1.25rem;
  background-color: var(--ru-border);
}

.register-card {
  background-color: var(--ru-card);
  border: 1px solid var(--ru-border);
  border-radius: 1rem;
  padding: 1.75rem 1.5rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.register-step {
  display: none;
}

.register-step.is-active {
  display: block;
}

.register-step-title {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-family: 'DM Sans', 'Inter', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.375rem;
  color: var(--ru-fg);
}

.register-step-title-icon {
  width: 2rem;
  height: 2rem;
  border-radius: var(--ru-radius-md);
  background-color: oklch(0.96 0.17 122 / 0.1);
  color: var(--ru-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  flex-shrink: 0;
}

.register-step-desc {
  font-size: 0.875rem;
  color: var(--ru-muted-fg);
  margin-bottom: 1.25rem;
}

.register-field-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.register-field-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  color: var(--ru-muted-fg);
  font-size: 0.8125rem;
}

.register-field-icon--confirm {
  position: relative;
  width: 1.375rem;
}

.register-field-icon--confirm .fa-check {
  position: absolute;
  right: -0.125rem;
  bottom: -0.125rem;
  font-size: 0.5rem;
  color: var(--ru-primary);
  background-color: var(--ru-card);
  border-radius: 50%;
  padding: 0.0625rem;
}

.register-platform-picker {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.register-platform-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  min-height: 4.5rem;
  padding: 0.625rem 0.5rem;
  border: 1px solid var(--ru-border);
  border-radius: var(--ru-radius-md);
  background-color: transparent;
  color: var(--ru-muted-fg);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.register-platform-btn:hover {
  border-color: var(--ru-muted-fg);
  color: var(--ru-fg);
}

.register-platform-btn.is-selected {
  border-color: var(--ru-primary);
  background-color: oklch(0.96 0.17 122 / 0.1);
  color: var(--ru-primary);
}

.register-platform-btn i,
.register-platform-btn .register-platform-svg {
  font-size: 1.375rem;
  line-height: 1;
}

.register-platform-svg {
  width: 1.375rem;
  height: 1.375rem;
}

.register-channel-prefix {
  font-size: 0.8125rem;
  white-space: nowrap;
}

.register-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--ru-border);
}

.register-review {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.register-review-row {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 0.75rem;
  align-items: start;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--ru-border);
}

.register-review-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.register-review-row dt {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ru-muted-fg);
  margin: 0;
}

.register-review-row dd {
  font-size: 0.875rem;
  color: var(--ru-fg);
  margin: 0;
  font-weight: 500;
}

.register-sign-in {
  margin-top: 1.25rem;
  font-size: 0.875rem;
  color: var(--ru-muted-fg);
}

.register-sign-in a {
  color: var(--ru-primary);
}

.register-sign-in a:hover {
  color: var(--ru-primary-hover);
}

.register-password-mismatch {
  margin-top: 0.375rem;
  margin-bottom: 0;
  font-size: 0.8125rem;
  color: var(--ru-destructive);
}

.register-password-mismatch[hidden] {
  display: none !important;
}

@media (max-width: 479.98px) {
  .register-progress-label {
    display: none;
  }

  .register-progress-icon {
    width: 2.125rem;
    height: 2.125rem;
    font-size: 0.8125rem;
  }

  .register-progress-line {
    min-width: 0.375rem;
    max-width: 1rem;
  }

  .register-card {
    padding: 1.25rem 1rem;
  }

  .register-review-row {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }
}
