/* ==========================================================================
   shell.css — app-shell layer (sidebar, topbar, footer, auth) and repairs to
   colours that bypassed the admin-driven theme in color.php.
   Loaded after main.css and custom.css, so plain overrides are enough.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Dynamic-colour repairs
   -------------------------------------------------------------------------- */

/* custom.css consumes the HSL triplet --main inside rgb(), which rendered an
   unrelated hue (the hue angle was read as a red channel). Route these back
   through --base so they follow the admin's colour. */
.payment-card-title {
  background-color: hsl(var(--base));
  color: hsl(var(--white));
}

.payment-system-list {
  --hover-border-color: hsl(var(--base));
}

.payment-system-list.is-scrollable::-webkit-scrollbar-thumb {
  background-color: hsl(var(--base));
}

.payment-item:has(.payment-item__radio:checked) .payment-item__check {
  border: 3px solid hsl(var(--base));
}

.base-color {
  color: hsl(var(--base)) !important;
}

/* Topbar avatar circle was a fixed navy that clashed with any other theme. */
.user-icon {
  background: hsl(var(--base) / 0.16);
  color: hsl(var(--base));
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  flex-shrink: 0;
}

/* The copy confirmation used a fixed orange. */
.copied::after {
  background-color: hsl(var(--base));
}

.cookies-card__icon {
  background-color: hsl(var(--base));
}

/* --------------------------------------------------------------------------
   2. Sidebar
   -------------------------------------------------------------------------- */

.dashboard .sidebar-menu {
  scrollbar-width: thin;
  border-right: 1px solid hsl(var(--white) / 0.06);
  padding-bottom: 24px;
}

.dashboard .sidebar-logo {
  margin: 26px 0 22px;
  padding: 0 24px;
}

.dashboard .sidebar-logo__link {
  display: inline-block;
  transition: opacity 0.2s linear;
}

.dashboard .sidebar-logo__link:hover {
  opacity: 0.85;
}

.dashboard .sidebar-menu__close {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background-color: hsl(var(--white) / 0.08);
  color: hsl(var(--white));
}

.dashboard .sidebar-menu__close:active {
  top: 8px;
  transform: scale(0.94);
}

/* Balance summary card */
.dashboard .profile-account {
  padding: 22px 20px;
  text-align: left;
  /* The sidebar stays dark in both themes and .profile-account re-declares
     --white to absolute white, so anchor all its text (incl. the .small
     Investment / ROI+Commissions rows) to it — otherwise those rows inherit
     the light-theme dark ink and vanish on the dark sidebar. */
  color: hsl(var(--white));
}

.dashboard .profile-account__icon {
  width: 30px;
  height: 30px;
  color: hsl(var(--white));
  font-size: 15px;
}

.dashboard .profile-account__name {
  font-size: 16px;
  margin: 12px 0 14px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  line-height: 1.35;
  word-break: break-word;
}

.dashboard .profile-account .deposit__list {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.dashboard .profile-account .deposit__item {
  font-size: 15px;
  margin-bottom: 0;
}

.dashboard .profile-account .deposit__item:last-child {
  font-size: 19px;
  letter-spacing: -0.01em;
}

.dashboard .profile-account .small {
  font-size: 12.5px;
  line-height: 1.6;
}

.dashboard .profile-account .text-muted {
  color: hsl(var(--white) / 0.6) !important;
}

/* Menu items: one consistent active treatment. main.css only styled
   `.sidebar-menu-list__item.active > a`, but the blade marks the anchor, so
   active single items previously got a colour change and nothing else. */
.dashboard .sidebar-menu-list {
  margin-top: 26px;
  padding: 0 8px;
}

.dashboard .sidebar-menu-list__item {
  margin-bottom: 2px;
}

.dashboard .sidebar-menu-list__link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  border-radius: 8px;
  color: hsl(var(--white) / 0.78);
  transition: background 0.18s linear, color 0.18s linear;
}

.dashboard .sidebar-menu-list__link .icon {
  margin-right: 0;
  font-size: 1.25rem;
  width: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dashboard .sidebar-menu-list__link .text {
  flex: 1;
}

.dashboard .sidebar-menu-list__link:hover,
.dashboard .sidebar-menu-list__link:focus-visible {
  background: hsl(var(--base) / 0.14);
  color: hsl(var(--white));
}

.dashboard .sidebar-menu-list__link.active,
.dashboard .sidebar-menu-list__link.sidebar-submenu__open,
.dashboard .sidebar-menu-list__item.active > a {
  background: var(--base-gradient);
  color: hsl(var(--white));
  font-weight: 600;
  box-shadow: 0 6px 18px hsl(var(--base) / 0.22);
}

.dashboard .sidebar-menu-list__item.has-dropdown > a::after {
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  transition: transform 0.18s linear;
}

/* Expanded parent: point the caret down and keep the panel open, which
   main.css only did when the <li> also carried .active. */
.dashboard .sidebar-menu-list__item.has-dropdown > a.sidebar-submenu__open::after,
.dashboard .sidebar-menu-list__item.has-dropdown.active > a::after {
  transform: translateY(-50%) rotate(90deg);
}

.dashboard .sidebar-submenu.sidebar-submenu__open {
  display: block;
}

.dashboard .sidebar-submenu-list {
  padding: 4px 0 6px;
}

.dashboard .sidebar-submenu-list__item {
  margin-bottom: 2px;
}

.dashboard .sidebar-submenu-list__link {
  padding: 9px 16px 9px 34px;
  margin-left: 16px;
  border-radius: 8px;
  font-size: 14px;
  color: hsl(var(--white) / 0.7);
}

.dashboard .sidebar-submenu-list__link:hover,
.dashboard .sidebar-submenu-list__link:focus-visible {
  background: hsl(var(--base) / 0.14);
  color: hsl(var(--white));
}

.dashboard .sidebar-submenu-list__link.active,
.dashboard .sidebar-submenu-list__item.active > a {
  background: hsl(var(--base) / 0.2);
  color: hsl(var(--white));
  font-weight: 600;
}

.dashboard .sidebar-submenu-list__link::before {
  border-color: hsl(var(--white) / 0.45);
}

.dashboard .sidebar-submenu-list__link.active::before {
  background-color: hsl(var(--base));
  border-color: hsl(var(--base));
}

/* --------------------------------------------------------------------------
   3. Topbar
   -------------------------------------------------------------------------- */

.dashboard .dashboard-header {
  position: sticky;
  top: 0;
  z-index: 99;
  border-bottom: 1px solid hsl(var(--white) / 0.06);
}

.dashboard .dashboard-header__inner {
  padding: 12px 0;
  gap: 16px;
}

.dashboard .dashboard-header__left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.dashboard .dashboard-body__bar {
  margin: 0;
}

.dashboard .dashboard-body__bar-icon {
  margin-bottom: 0;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 1.15rem;
  background-color: hsl(var(--white) / 0.06);
  transition: background-color 0.18s linear;
}

.dashboard .dashboard-body__bar-icon:hover {
  background-color: hsl(var(--base) / 0.18);
  color: hsl(var(--white));
}

.dashboard .dashboard-header__title {
  margin-bottom: 0;
  font-size: 1.15rem;
  font-weight: 600;
  color: hsl(var(--white));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard .user-info__button {
  padding: 6px 34px 6px 8px;
  border-radius: 10px;
  transition: background-color 0.18s linear;
}

.dashboard .user-info__button:hover {
  background-color: hsl(var(--white) / 0.06);
}

.dashboard .user-info__button::before {
  right: 12px;
  transition: transform 0.18s linear;
}

.dashboard .user-info__profile {
  min-width: 0;
}

.dashboard .user-info__name {
  margin-bottom: 0;
  font-weight: 600;
  color: hsl(var(--white));
  line-height: 1.3;
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard .user-info__profile span {
  display: block;
  font-size: 12px;
  color: hsl(var(--white) / 0.6);
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard .user-info .user-info-dropdown {
  width: 230px;
  margin-top: 10px;
  padding: 6px;
}

.dashboard .user-info .user-info-dropdown__link {
  border-radius: 8px;
  padding: 10px 12px !important;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
}

.dashboard .user-info .user-info-dropdown__link .icon {
  margin-right: 0;
  width: 18px;
  text-align: center;
}

@media screen and (max-width: 575px) {
  .dashboard .dashboard-header__inner {
    display: flex;
    flex-wrap: wrap;
  }

  .dashboard .dashboard-header__right {
    margin-top: 0;
  }

  .dashboard .dashboard-header__title {
    display: none;
  }

  .dashboard .user-info__name,
  .dashboard .user-info__profile span {
    max-width: 130px;
  }
}

/* Mobile drawer backdrop */
.sidebar-overlay {
  background-color: hsl(var(--black) / 0.6);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

/* --------------------------------------------------------------------------
   4. Preloader
   -------------------------------------------------------------------------- */

.preloader-wrapper {
  background-color: hsl(var(--body-bg));
}

/* Absolute so the existing (absolutely positioned) dot animation keeps its
   centering. */
.preloader-wrapper__logo {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -110px);
  max-width: 160px;
  max-height: 56px;
  width: auto;
  animation: shell-preloader-fade 1.6s ease-in-out infinite;
}

@keyframes shell-preloader-fade {
  0%,
  100% {
    opacity: 0.55;
  }

  50% {
    opacity: 1;
  }
}

/* --------------------------------------------------------------------------
   5. Public header / footer
   -------------------------------------------------------------------------- */

.header .navbar-brand.logo img {
  max-width: 170px;
  max-height: 54px;
}

.login-registration-list__icon {
  transition: background-color 0.18s linear, color 0.18s linear;
}

.header .header-auth-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 20px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.2;
  white-space: nowrap;
  transition: background 0.18s linear, color 0.18s linear,
    border-color 0.18s linear;
}

.header .header-auth-btn--ghost {
  color: hsl(var(--white));
  border: 1px solid hsl(var(--white) / 0.22);
}

.header .header-auth-btn--ghost:hover,
.header .header-auth-btn--ghost:focus-visible {
  border-color: hsl(var(--base));
  color: hsl(var(--base));
}

.header .header-auth-btn--solid {
  background: var(--base-gradient);
  color: hsl(var(--white));
  border: 1px solid hsl(var(--white) / 0.18);
}

.header .header-auth-btn--solid:hover,
.header .header-auth-btn--solid:focus-visible {
  color: hsl(var(--white));
  box-shadow: 0 8px 20px hsl(var(--base) / 0.3);
}

.header .top-button {
  gap: 10px;
}

.footer-item__logo a img {
  max-width: 170px;
  max-height: 54px;
}

.footer-menu__link:focus-visible {
  color: hsl(var(--base));
}

.footer-contact-menu__item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
}

.footer-contact-menu__item-icon {
  color: hsl(var(--base));
  line-height: 1.6;
  flex-shrink: 0;
}

.footer-contact-menu__item-content .text {
  margin-bottom: 0;
  word-break: break-word;
}

.bottom-footer__text {
  margin-bottom: 0;
}

.bottom-footer__text a {
  color: hsl(var(--base));
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   6. Auth pages
   -------------------------------------------------------------------------- */

.account-form-wrapper {
  min-height: 100vh;
}

.account-form__logo img {
  max-width: 190px;
  max-height: 64px;
  width: auto;
}

.account-form {
  width: 100%;
  margin-top: 36px;
}

.account-form__title {
  margin-bottom: 12px;
}

.account-form__text {
  margin-bottom: 28px;
  color: hsl(var(--white) / 0.7);
}

.account-form .form--control:focus {
  border-color: hsl(var(--base)) !important;
  box-shadow: 0 0 0 3px hsl(var(--base) / 0.18) !important;
}

.account-form .form--check {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 0;
}

.account-form .form--check .form-check-input {
  margin: 0;
  flex-shrink: 0;
}

.account-form .form--check .form-check-input:checked {
  background-color: hsl(var(--base));
  border-color: hsl(var(--base));
}

.account-form .form--check .form-check-label {
  margin-bottom: 0;
  cursor: pointer;
  color: hsl(var(--white) / 0.78);
}

.account-form .password-show-hide {
  color: hsl(var(--white) / 0.5);
  cursor: pointer;
  transition: color 0.18s linear;
}

.account-form .password-show-hide:hover {
  color: hsl(var(--base));
}

.forgot-password {
  text-align: center;
  margin-top: 18px;
}

.forgot-password__link:hover,
.forgot-password__link:focus-visible {
  color: hsl(var(--base));
}

@media screen and (max-width: 767px) {
  .account-form-wrapper {
    min-height: auto;
    padding-block: 48px;
  }

  .account-form {
    margin-top: 28px;
  }
}

/* OTP boxes: assets/global/css/verification-code.css hardcodes the surface
   colour and loads from @push('style'), so these need !important to win. */
.verification-code span {
  background: hsl(var(--section-bg)) !important;
  border: 1px solid hsl(var(--white) / 0.09) !important;
  border-radius: 6px;
  color: hsl(var(--white)) !important;
}

.verification-code:focus-within span {
  border-color: hsl(var(--base) / 0.5) !important;
}

/* --------------------------------------------------------------------------
   7. Accessibility and motion
   -------------------------------------------------------------------------- */

a:focus-visible,
button:focus-visible,
[role="button"]:focus-visible,
.sidebar-menu__close:focus-visible,
.dashboard-body__bar-icon:focus-visible,
.user-info__button:focus-visible {
  outline: 2px solid hsl(var(--base));
  outline-offset: 2px;
}

.scroll-top:focus-visible {
  outline: 2px solid hsl(var(--white));
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .preloader-wrapper__logo,
  .preloader-wrapper .loader {
    animation: none !important;
  }

  .dashboard .sidebar-menu,
  .dashboard .sidebar-menu-list__link,
  .dashboard .user-info__button,
  .dashboard .dashboard-body__bar-icon {
    transition: none !important;
  }
}

/* --------------------------------------------------------------------------
   Compact table data — denser rows so more fits on screen (esp. reports)
   -------------------------------------------------------------------------- */
.table > :not(caption) > * > * {
  padding: 0.45rem 0.6rem;
}
.table.custom-data-table > :not(caption) > * > *,
.table--light > :not(caption) > * > * {
  padding: 0.5rem 0.65rem;
}
.table thead th {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  font-size: 0.82rem;
}
.table td,
.table th {
  vertical-align: middle;
}
