/* Fintech shell — header, footer, sidebar, dashboard chrome */

body.fintech-ui .skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 9999;
  padding: 0.65rem 1rem;
  border-radius: 8px;
  background: var(--fin-blue);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}

body.fintech-ui .skip-link:focus {
  top: 1rem;
}

/* Marketing header */
body.fintech-ui .site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 500;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(5, 9, 20, 0.78);
  backdrop-filter: blur(22px) saturate(145%);
  -webkit-backdrop-filter: blur(22px) saturate(145%);
}

body.fintech-ui .site-topbar {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(4, 8, 18, 0.9);
  font-size: 0.78rem;
  color: var(--fin-muted);
}

body.fintech-ui .site-header .inner {
  min-height: 76px;
  height: 76px;
  display: flex;
  align-items: center;
  gap: 1rem;
}

body.fintech-ui .site-header .brand {
  color: var(--fin-text);
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.035em;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.72rem;
}

body.fintech-ui .site-header .brand img,
body.fintech-ui .dash-sidebar .brand img,
body.fintech-ui .dash-mobile-bar .brand img {
  width: 43px;
  height: 43px;
  object-fit: contain;
  border: 0;
  border-radius: 13px;
  background: transparent;
  box-shadow:
    0 10px 26px rgba(0, 0, 0, 0.3),
    0 0 24px rgba(79, 124, 255, 0.14);
  transition: transform 220ms ease, filter 220ms ease, box-shadow 220ms ease;
}

body.fintech-ui .brand:hover img {
  transform: translateY(-1px) rotate(-2deg);
  filter: saturate(1.12) brightness(1.06);
  box-shadow:
    0 14px 30px rgba(0, 0, 0, 0.34),
    0 0 32px rgba(79, 124, 255, 0.22);
}

body.fintech-ui .site-header .nav {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  margin-left: auto;
}

body.fintech-ui .site-header__theme--end {
  margin-left: auto;
  padding-left: 0.35rem;
}

body.fintech-ui .site-header .nav a:not(.btn) {
  color: #b1bdd0;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
}

body.fintech-ui .fintech-credit-chip {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0.25rem 0.7rem;
  border: 1px solid rgba(245, 189, 79, 0.28);
  border-radius: 999px;
  background: rgba(245, 189, 79, 0.1);
  color: var(--fin-gold);
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 600;
}


body.fintech-ui .site-menu-toggle,
body.fintech-ui .dash-menu-toggle {
  border: 1px solid rgba(120, 160, 255, 0.25);
  background: rgba(79, 124, 255, 0.1);
  color: var(--fin-text);
  border-radius: 12px;
  cursor: pointer;
}

body.fintech-ui .site-nav-drawer,
body.fintech-ui .dash-sidebar {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(9, 16, 31, 0.96);
  backdrop-filter: blur(18px);
}

body.fintech-ui:has(.site-header) main#main-content {
  padding-top: 76px;
}

body.fintech-ui.page-home-fintech main#main-content {
  padding-top: 0;
}

body.fintech-ui .site-footer {
  padding: 2.2rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  background: #040711;
  color: #6f7d92;
}

body.fintech-ui .site-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

body.fintech-ui .site-footer .social-link {
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.035);
  color: #9eabc0;
}

/* Dashboard shell */
body.fintech-ui .dash-shell {
  min-height: 100vh;
  background:
    radial-gradient(ellipse 40% 30% at 100% 0%, rgba(58, 105, 230, 0.08), transparent 70%),
    var(--fin-bg);
}

body.fintech-ui .dash-wrap {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
}

body.fintech-ui .dash-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 0.85rem 0.7rem;
  border-right: 1px solid var(--fin-border);
  background:
    linear-gradient(180deg, rgba(79, 124, 255, 0.06), transparent 22%),
    rgba(8, 14, 28, 0.92);
  backdrop-filter: blur(16px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

/* Dense nav so admin menus fit a normal laptop viewport without feeling cut off */
@media (min-width: 961px) {
  body.fintech-ui .dash-sidebar {
    overflow-y: auto;
  }

  body.fintech-ui .dash-sidebar__head {
    min-height: 0;
    padding: 0 0.35rem 0.55rem;
    margin-bottom: 0.35rem;
  }

  body.fintech-ui .dash-sidebar .brand img {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }

  body.fintech-ui .dash-sidebar .brand {
    font-size: 0.88rem;
  }

  body.fintech-ui .dash-sidebar__balance {
    margin: 0.2rem 0.2rem 0.45rem;
    padding: 0.55rem 0.7rem;
  }

  body.fintech-ui .dash-sidebar__balance strong {
    font-size: 1.05rem;
  }

  body.fintech-ui .dash-sidebar .nav-menu {
    gap: 0.04rem;
    margin-top: 0.2rem;
  }

  body.fintech-ui .dash-sidebar .nav-link {
    min-height: 32px;
    padding: 0.28rem 0.6rem;
    border-radius: 8px;
    font-size: 0.78rem;
    gap: 0.55rem;
  }

  body.fintech-ui .dash-sidebar .nav-ico {
    width: 16px;
    height: 16px;
  }

  body.fintech-ui .dash-sidebar .nav-menu__divider {
    margin: 0.35rem 0.35rem;
  }

  body.fintech-ui .dash-sidebar .nav-link[style*="margin-top"] {
    margin-top: 0.35rem !important;
  }
}

body.fintech-ui .dash-sidebar__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0 0.45rem 1rem;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid var(--fin-border);
}

body.fintech-ui .dash-sidebar .brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
  color: var(--fin-text);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
}

body.fintech-ui .dash-sidebar .nav-menu {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  margin-top: 0.5rem;
}

body.fintech-ui .dash-sidebar .nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 44px;
  padding: 0.65rem 0.8rem;
  border-radius: 11px;
  color: var(--fin-muted);
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}

body.fintech-ui .dash-sidebar .nav-link:hover {
  background: rgba(79, 124, 255, 0.1);
  color: #dce6ff;
}

body.fintech-ui .dash-sidebar .nav-link.active {
  position: relative;
  background: rgba(79, 124, 255, 0.16);
  color: #eef3ff;
}

body.fintech-ui .dash-sidebar .nav-link.active::before {
  content: "";
  position: absolute;
  left: 0;
  width: 3px;
  height: 20px;
  border-radius: 0 3px 3px 0;
  background: var(--fin-gold);
}

body.fintech-ui .dash-sidebar .nav-ico {
  display: inline-flex;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

body.fintech-ui .dash-sidebar .nav-menu__divider {
  border: 0;
  border-top: 1px solid var(--fin-border);
  margin: 0.65rem 0;
}

body.fintech-ui .dash-sidebar .nav-link--button {
  width: 100%;
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

body.fintech-ui .dash-sidebar__balance {
  margin: 0.75rem 0.45rem 0;
  padding: 0.85rem;
  border: 1px solid rgba(120, 160, 255, 0.2);
  border-radius: 12px;
  background: rgba(79, 124, 255, 0.08);
}

body.fintech-ui .dash-sidebar__balance strong {
  display: block;
  color: var(--fin-gold);
  font-family: var(--font-heading);
  font-size: 1.1rem;
}

body.fintech-ui .dash-sidebar__balance span {
  display: block;
  margin-top: 0.15rem;
  color: var(--fin-muted);
  font-size: 0.72rem;
}

body.fintech-ui .dash-main {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: clamp(1.25rem, 3vw, 2.25rem);
  min-width: 0;
}

body.fintech-ui .dash-social-footer {
  display: flex;
  justify-content: center;
  padding: 1.5rem 0 0.5rem;
  margin-top: 2rem;
}

body.fintech-ui .dash-two-col {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
  gap: 1.15rem;
}

/* Admin quick search */
body.fintech-ui .admin-search,
body.fintech-ui .admin-quick-search {
  position: relative;
  margin-bottom: 1.25rem;
}

body.fintech-ui .admin-search input,
body.fintech-ui .admin-quick-search__input {
  width: 100%;
  min-height: 46px;
  padding: 0.7rem 1rem 0.7rem 2.65rem;
  border: 1px solid var(--fin-border);
  border-radius: 13px;
  background: rgba(4, 9, 20, 0.55);
  color: var(--fin-text);
}

body.fintech-ui .admin-search__results,
body.fintech-ui .admin-quick-search__results {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  right: 0;
  z-index: 200;
  border: 1px solid var(--fin-border);
  border-radius: var(--fin-radius-sm);
  background: var(--fin-surface);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

body.fintech-ui .admin-search__results a,
body.fintech-ui .admin-quick-search__results a {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--fin-text);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

body.fintech-ui .admin-search__results a:hover,
body.fintech-ui .admin-quick-search__results a:hover {
  background: rgba(79, 124, 255, 0.1);
}

body.fintech-ui .dash-mobile-bar {
  display: none;
}

body.fintech-ui .dash-menu-close {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--fin-border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--fin-text);
  font-size: 1.5rem;
  cursor: pointer;
}

@media (max-width: 960px) {
  body.fintech-ui .dash-shell {
    overflow: visible;
  }

  body.fintech-ui .dash-wrap {
    grid-template-columns: 1fr;
  }

  body.fintech-ui .dash-mobile-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    position: sticky;
    top: 0;
    z-index: 300;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--fin-border);
    background: rgba(5, 9, 20, 0.92);
    backdrop-filter: blur(16px);
  }

  body.fintech-ui .dash-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 400;
    width: min(88vw, 320px);
    height: 100vh;
    max-height: 100dvh;
    transform: translateX(-105%);
    transition: transform 0.28s ease;
    box-shadow: var(--shadow-lg);
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  body.fintech-ui.dash-menu-open .dash-sidebar {
    transform: translateX(0);
  }

  body.fintech-ui.dash-menu-open {
    overflow: hidden;
  }

  body.fintech-ui .dash-sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 350;
    background: rgba(2, 5, 12, 0.65);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
  }

  body.fintech-ui.dash-menu-open .dash-sidebar-backdrop {
    display: block;
    opacity: 1;
    pointer-events: auto;
  }

  body.fintech-ui .dash-menu-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  body.fintech-ui .site-header .site-header__nav-desktop {
    display: none !important;
  }

  body.fintech-ui .site-menu-toggle {
    display: inline-flex !important;
  }

  /* Align public drawer with fintech 960px breakpoint (app.css only covers ≤768) */
  body.fintech-ui .site-nav-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 350;
    background: rgba(2, 5, 12, 0.65);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
  }

  body.fintech-ui.site-menu-open .site-nav-backdrop {
    display: block;
    opacity: 1;
    pointer-events: auto;
  }

  body.fintech-ui .site-nav-drawer {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 400;
    width: min(88vw, 320px);
    height: 100vh;
    max-height: 100dvh;
    padding: 1rem 0.9rem 1.25rem;
    transform: translateX(-105%);
    transition: transform 0.28s ease;
    box-shadow: var(--shadow-lg);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  body.fintech-ui.site-menu-open .site-nav-drawer {
    transform: translateX(0);
  }

  body.fintech-ui.site-menu-open {
    overflow: hidden;
  }
}

@media (min-width: 961px) {
  body.fintech-ui .site-menu-toggle {
    display: none;
  }
}
