body {
  background: #f5f7fb;
}

.portal-auth-mode .sidebar,
.portal-auth-mode .navbar {
  display: none !important;
}

.portal-auth-mode .main {
  margin-left: 0;
  min-height: 100vh;
  width: 100%;
}

.portal-auth-mode .content {
  padding: 0;
}

.portal-auth-mode #cabinetRoot {
  max-width: none;
}

.portal-auth-page {
  background:
    radial-gradient(circle at 50% 0%, rgba(59, 125, 221, .08), transparent 32rem),
    #f5f7fb;
  min-height: 100vh;
}

.portal-auth-page .card {
  box-shadow: 0 1.25rem 3rem rgba(18, 38, 63, .08);
}

.portal-auth-page [data-feather] {
  height: 28px;
  width: 28px;
}

.portal-auth-shell {
  max-width: 520px;
  padding-left: .75rem;
  padding-right: .75rem;
  width: 100%;
}

.portal-auth-check {
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: .45rem;
  box-shadow: 0 1.25rem 3rem rgba(18, 38, 63, .08);
  padding: 2.25rem;
  text-align: center;
}

.portal-auth-check-logo {
  background: #050a0f;
  border: 1px solid rgba(59, 125, 221, .18);
  border-radius: 50%;
  box-shadow: 0 .75rem 1.75rem rgba(18, 38, 63, .12);
  height: 72px;
  margin-bottom: 1.25rem;
  object-fit: cover;
  width: 72px;
}

.portal-auth-check-status {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e9ecef;
  border-radius: .35rem;
  color: #6c757d;
  display: inline-flex;
  font-size: .875rem;
  font-weight: 600;
  gap: .5rem;
  margin-top: 1.25rem;
  padding: .6rem .85rem;
}

.portal-auth-card {
  border: 0;
  border-radius: .45rem;
  overflow: hidden;
}

.portal-auth-state[hidden] {
  display: none !important;
}

.portal-auth-state.is-active {
  animation: portal-auth-state-in .18s ease-out both;
}

.portal-auth-icon {
  align-items: center;
  background: #e8f1ff;
  border-radius: .45rem;
  color: #3b7ddd;
  display: inline-flex;
  height: 48px;
  justify-content: center;
  width: 48px;
}

.portal-auth-icon [data-feather] {
  height: 24px;
  width: 24px;
}

.portal-auth-actions {
  display: flex;
  justify-content: center;
  margin-top: .75rem;
}

.portal-auth-switch {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e9ecef;
  border-radius: .45rem;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-top: 1.25rem;
  padding: 1rem;
}

.portal-auth-switch strong,
.portal-auth-switch span {
  display: block;
}

.portal-auth-switch strong {
  color: #212529;
  font-size: .95rem;
  font-weight: 600;
}

.portal-auth-switch span {
  color: #6c757d;
  font-size: .875rem;
  margin-top: .15rem;
}

.portal-two-factor-shell {
  max-width: 520px;
}

.portal-two-factor-status {
  align-items: flex-start;
  background: #f8fafc;
  border: 1px solid #e9ecef;
  border-radius: .45rem;
  display: flex;
  gap: .75rem;
  padding: 1rem;
}

.portal-two-factor-status [data-feather] {
  flex: 0 0 auto;
  height: 20px;
  margin-top: .125rem;
  width: 20px;
}

.portal-two-factor-status strong,
.portal-two-factor-status span {
  display: block;
}

.portal-two-factor-status strong {
  color: #212529;
  font-weight: 600;
  line-height: 1.3;
}

.portal-two-factor-status span {
  color: #6c757d;
  font-size: .9rem;
  margin-top: .2rem;
}

.portal-two-factor-help {
  border-top: 1px solid #e9ecef;
  padding-top: 1.25rem;
}

.portal-two-factor-help .h5 {
  color: #212529;
  font-weight: 600;
}

.portal-toast-stack {
  align-items: flex-end;
  bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: .75rem;
  max-width: min(420px, calc(100vw - 2rem));
  pointer-events: none;
  position: fixed;
  right: 1.5rem;
  z-index: 1400;
}

.portal-toast {
  align-items: flex-start;
  background: #fff;
  border: 1px solid #e9ecef;
  border-left: 4px solid #3b7ddd;
  border-radius: .45rem;
  box-shadow: 0 1rem 2.25rem rgba(18, 38, 63, .14);
  color: #212529;
  display: flex;
  gap: .75rem;
  max-width: 100%;
  min-width: min(340px, calc(100vw - 2rem));
  opacity: 0;
  padding: .9rem 1rem;
  pointer-events: auto;
  transform: translateY(12px);
  transition: opacity .18s ease, transform .18s ease;
}

.portal-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.portal-toast-icon {
  align-items: center;
  color: #3b7ddd;
  display: inline-flex;
  flex: 0 0 auto;
  height: 1.25rem;
  justify-content: center;
  margin-top: .08rem;
  width: 1.25rem;
}

.portal-toast-icon [data-feather] {
  height: 1.1rem;
  width: 1.1rem;
}

.portal-toast-message {
  display: block;
  font-size: .95rem;
  font-weight: 500;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.portal-toast-success {
  border-left-color: #1cbb8c;
}

.portal-toast-success .portal-toast-icon {
  color: #1cbb8c;
}

.portal-toast-danger {
  border-left-color: #dc3545;
}

.portal-toast-danger .portal-toast-icon {
  color: #dc3545;
}

.portal-toast-warning {
  border-left-color: #fcb92c;
}

.portal-toast-warning .portal-toast-icon {
  color: #fcb92c;
}

.portal-toast-info {
  border-left-color: #3b7ddd;
}

@keyframes portal-auth-state-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 575.98px) {
  .portal-toast-stack {
    align-items: stretch;
    bottom: 1rem;
    left: 1rem;
    max-width: none;
    right: 1rem;
  }

  .portal-toast {
    min-width: 0;
    width: 100%;
  }

  .portal-auth-switch {
    align-items: stretch;
    flex-direction: column;
    text-align: center;
  }
}

.sidebar-brand {
  font-size: 1.125rem;
  letter-spacing: 0;
}

.min-w-0 {
  min-width: 0;
}

.cabinet-user-logo,
.cabinet-profile-logo {
  background: #050a0f;
  border: 1px solid rgba(59, 125, 221, .18);
  object-fit: cover;
}

.cabinet-user-logo {
  box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .12);
}

.cabinet-preload-status {
  align-items: center;
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: .35rem;
  color: #6c757d;
  display: inline-flex;
  font-size: .875rem;
  font-weight: 600;
  gap: .5rem;
  padding: .6rem .8rem;
  white-space: nowrap;
}

.cabinet-skeleton-card {
  overflow: hidden;
}

.settings-profile-metric {
  border: 1px solid #e9ecef;
  border-radius: .35rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: hidden;
}

.settings-profile-metric > div {
  padding: 1rem;
}

.settings-profile-metric > div + div {
  border-left: 1px solid #e9ecef;
}

.settings-profile-metric span,
.settings-profile-metric strong {
  display: block;
}

.settings-profile-metric strong {
  color: #212529;
  font-size: 1.25rem;
  margin-top: .25rem;
}

.settings-mini-card .card-body {
  min-height: 166px;
}

.settings-security-row {
  align-items: flex-start;
  display: flex;
  gap: 1rem;
}

.settings-security-icon {
  align-items: center;
  background: #e8f1ff;
  border-radius: 50%;
  color: #3b7ddd;
  display: inline-flex;
  flex: 0 0 48px;
  height: 48px;
  justify-content: center;
  width: 48px;
}

.settings-security-icon [data-feather] {
  height: 22px;
  width: 22px;
}

.settings-link {
  padding-bottom: 1rem;
  padding-top: 1rem;
}

.settings-link-icon {
  align-items: center;
  background: #e8f1ff;
  border-radius: .35rem;
  color: #3b7ddd;
  display: inline-flex;
  flex: 0 0 auto;
  height: 40px;
  justify-content: center;
  margin-right: .875rem;
  width: 40px;
}

.settings-link:hover .settings-link-icon {
  background: #3b7ddd;
  color: #fff;
}

.cabinet-skeleton-line {
  animation: cabinetSkeletonShimmer 1.25s ease-in-out infinite;
  background: linear-gradient(90deg, #eef2f6 0%, #f8fafc 48%, #e8edf3 100%);
  background-size: 220% 100%;
  border-radius: .25rem;
  height: .85rem;
  width: 100%;
}

.cabinet-skeleton-title {
  height: 2rem;
}

.w-35 {
  width: 35% !important;
}

.w-40 {
  width: 40% !important;
}

.cabinet-skeleton-chart {
  align-items: end;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(8, minmax(18px, 1fr));
  height: 260px;
  padding: 2rem 1.25rem 1rem;
}

.cabinet-skeleton-chart span {
  animation: cabinetSkeletonPulse 1.35s ease-in-out infinite;
  background: linear-gradient(180deg, rgba(59, 125, 221, .28), rgba(59, 125, 221, .08));
  border-radius: .35rem .35rem .15rem .15rem;
  display: block;
  min-height: 36px;
}

.cabinet-skeleton-chart span:nth-child(2n) {
  animation-delay: .12s;
}

.cabinet-skeleton-chart span:nth-child(3n) {
  animation-delay: .24s;
}

.cabinet-skeleton-row {
  align-items: center;
  display: grid;
  gap: .75rem;
  grid-template-columns: 12px 1fr;
  padding: .75rem 0;
}

.cabinet-skeleton-row + .cabinet-skeleton-row {
  border-top: 1px solid #f1f3f5;
}

.cabinet-skeleton-dot {
  animation: cabinetSkeletonPulse 1.35s ease-in-out infinite;
  background: rgba(59, 125, 221, .35);
  border-radius: 50%;
  height: 10px;
  width: 10px;
}

@keyframes cabinetSkeletonShimmer {
  0% {
    background-position: 120% 0;
  }
  100% {
    background-position: -120% 0;
  }
}

@keyframes cabinetSkeletonPulse {
  0%, 100% {
    opacity: .55;
  }
  50% {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cabinet-skeleton-line,
  .cabinet-skeleton-chart span,
  .cabinet-skeleton-dot {
    animation: none;
  }
}

.sidebar-cta-content .fs-4 {
  color: #e9ecef;
}

.sidebar-cta-content [data-sidebar-paid] {
  color: #b7c4d2 !important;
}

.btn[data-copy].is-copied {
  background-color: #1cbb8c;
  border-color: #1cbb8c;
}

.affiliate-copy-list {
  display: grid;
  gap: 1.15rem;
}

.affiliate-copy-row {
  align-items: end;
  appearance: none;
  background: transparent;
  border: 0;
  color: #495057;
  cursor: pointer;
  display: grid;
  gap: .35rem .75rem;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 0;
  text-align: left;
  transition: color .16s ease;
  width: 100%;
}

.affiliate-copy-row:hover,
.affiliate-copy-row:focus-visible {
  color: #212529;
  outline: 0;
}

.affiliate-copy-label {
  color: #6c757d;
  font-size: .875rem;
  font-weight: 600;
  grid-column: 1 / -1;
}

.affiliate-copy-main {
  color: #343a40;
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 1rem;
  font-weight: 600;
  min-width: 0;
  overflow-wrap: anywhere;
  text-decoration-color: #adb5bd;
  text-decoration-line: underline;
  text-decoration-style: dashed;
  text-decoration-thickness: 1px;
  text-underline-offset: .28em;
  transition: color .16s ease, text-decoration-color .16s ease;
  width: fit-content;
  max-width: 100%;
}

.affiliate-copy-row:hover .affiliate-copy-main,
.affiliate-copy-row:focus-visible .affiliate-copy-main {
  color: #212529;
  text-decoration-color: #3b7ddd;
}

.affiliate-copy-row.is-copied .affiliate-copy-main {
  text-decoration-color: #1cbb8c;
}

.affiliate-copy-meta {
  color: #6c757d;
  font-size: .875rem;
  font-weight: 600;
  white-space: nowrap;
}

.cabinet-copy-toast {
  align-items: center;
  background: #1cbb8c;
  border-radius: .375rem;
  bottom: 1.5rem;
  box-shadow: 0 .75rem 1.75rem rgba(28, 187, 140, .22);
  color: #fff;
  display: inline-flex;
  font-size: .9375rem;
  font-weight: 600;
  justify-content: center;
  max-width: min(360px, calc(100vw - 2rem));
  opacity: 0;
  padding: .75rem 1rem;
  pointer-events: none;
  position: fixed;
  right: 1.5rem;
  transform: translateY(12px);
  transition: opacity .18s ease, transform .18s ease;
  z-index: 1100;
}

.cabinet-copy-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.cabinet-copy-toast.is-warning {
  background: #fcb92c;
  box-shadow: 0 .75rem 1.75rem rgba(252, 185, 44, .2);
  color: #212529;
}

.modal {
  display: none;
  height: 100%;
  left: 0;
  outline: 0;
  overflow-x: hidden;
  overflow-y: auto;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1055;
}

.modal-dialog {
  margin: .5rem;
  pointer-events: none;
  position: relative;
  width: auto;
}

.modal.fade .modal-dialog {
  transform: translateY(-50px);
  transition: transform .3s ease-out;
}

.modal.show .modal-dialog {
  transform: none;
}

.modal-dialog-centered {
  align-items: center;
  display: flex;
  min-height: calc(100% - 1rem);
}

.modal-content {
  background-clip: padding-box;
  background-color: #fff;
  border: 1px solid rgba(0, 0, 0, .2);
  border-radius: .3rem;
  display: flex;
  flex-direction: column;
  outline: 0;
  pointer-events: auto;
  position: relative;
  width: 100%;
}

.modal-lg {
  max-width: 560px;
}

.modal-header {
  align-items: center;
  border-bottom: 1px solid #dee2e6;
  display: flex;
  flex-shrink: 0;
  justify-content: space-between;
  padding: 1rem;
}

.modal-title {
  line-height: 1.5;
  margin-bottom: 0;
}

.modal-body {
  flex: 1 1 auto;
  padding: 1rem;
  position: relative;
}

.modal-footer {
  align-items: center;
  border-top: 1px solid #dee2e6;
  display: flex;
  flex-wrap: wrap;
  flex-shrink: 0;
  gap: .5rem;
  justify-content: flex-end;
  padding: .75rem;
}

.modal-backdrop {
  background-color: #000;
  height: 100vh;
  left: 0;
  position: fixed;
  top: 0;
  width: 100vw;
  z-index: 1050;
}

.modal-backdrop.fade {
  opacity: 0;
}

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

.modal-open {
  overflow: hidden;
}

.btn-close {
  background: transparent;
  border: 0;
  color: #000;
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
  opacity: .5;
  padding: .25rem;
}

.btn-close::before {
  content: "\00d7";
}

.btn-close:hover {
  opacity: .75;
}

.withdrawal-modal .modal-content {
  border: 0;
  border-radius: .5rem;
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, .18);
}

.withdrawal-modal .modal-header,
.withdrawal-modal .modal-footer {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.withdrawal-modal .modal-body {
  padding: 1.5rem;
}

.withdrawal-summary {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.withdrawal-summary-card {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: .375rem;
  padding: 1rem;
}

.withdrawal-summary-card .h3 {
  color: #212529;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0;
}

.balance-plan-card {
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.balance-plan-card:not(.is-disabled):hover {
  border-color: rgba(59, 125, 221, .45) !important;
  box-shadow: 0 .5rem 1rem rgba(33, 37, 41, .08);
  transform: translateY(-1px);
}

.balance-plan-card.is-disabled {
  background: #f8f9fa;
}

.withdrawal-modal .input-group-text {
  background: #f8f9fa;
  border-color: #ced4da;
  color: #495057;
  font-weight: 600;
}

.qr-frame {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: .25rem;
  display: grid;
  justify-items: center;
  padding: 1rem;
}

.qr-frame img {
  max-width: 220px;
  width: 100%;
}

.secret-code,
.code {
  background: #f8f9fa;
  border: 1px dashed #adb5bd;
  border-radius: .2rem;
  color: #495057;
  font-family: Consolas, "SFMono-Regular", monospace;
  overflow-wrap: anywhere;
  padding: .75rem .875rem;
}

@media (min-width: 576px) {
  .modal-dialog {
    margin: 1.75rem auto;
    max-width: 500px;
  }

  .modal-dialog.modal-lg {
    max-width: 560px;
  }

  .modal-dialog-centered {
    min-height: calc(100% - 3.5rem);
  }
}

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