:root{
 --uc-primary:#3157e5;--uc-secondary:#6c4df6;--uc-sidebar:#071b3a;
 --uc-sidebar-text:#dbe7ff;--uc-accent:#19b69b;
}
body{--primary:var(--uc-primary);--bs-primary:var(--uc-primary);}
.btn-primary,.bg-primary,.badge-primary{background-color:var(--uc-primary)!important;border-color:var(--uc-primary)!important}
.text-primary,.link-primary{color:var(--uc-primary)!important}
.border-primary{border-color:var(--uc-primary)!important}
.btn-liner-gradient,.uc-fab-main{background:linear-gradient(135deg,var(--uc-primary),var(--uc-secondary))!important}
.sidebar{background:var(--uc-sidebar)!important;color:var(--uc-sidebar-text)!important}
body.uc-sidebar-gradient .sidebar{background:linear-gradient(180deg,var(--uc-sidebar),color-mix(in srgb,var(--uc-sidebar) 78%,#000))!important}
.sidebar .sidebar-menu a,.sidebar .sidebar-menu a span,.sidebar .menu-title span,.sidebar .sidebar-logo{color:var(--uc-sidebar-text)!important}
.sidebar .sidebar-menu a:hover,.sidebar .sidebar-menu a.active,.sidebar .sidebar-menu li.active>a{background:linear-gradient(90deg,var(--uc-primary),var(--uc-secondary))!important;color:#fff!important}
.sidebar .sidebar-menu a:hover i,.sidebar .sidebar-menu a.active i,.sidebar .sidebar-menu li.active>a i{color:#fff!important}
.uc-brand-lockup{display:flex;align-items:center;gap:10px;min-width:0;text-decoration:none}
.uc-brand-lockup img{width:38px;height:38px;object-fit:contain;flex:0 0 38px;border-radius:9px}
.uc-brand-lockup .uc-brand-name{font-weight:800;font-size:19px;line-height:1.05;color:inherit;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.uc-brand-lockup .uc-brand-tagline{font-size:10px;opacity:.72;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:145px}
.sidebar-mini .uc-brand-copy{display:none}
.navbar-header .uc-brand-lockup .uc-brand-name{color:#10234d}
.uc-theme-dark{background:#0d1424;color:#e9efff}
.uc-theme-dark .page-wrapper,.uc-theme-dark .content{background:#0d1424!important}
.uc-theme-dark .card,.uc-theme-dark .modal-content,.uc-theme-dark .navbar-header{background:#121c30!important;color:#e9efff}
@media(max-width:991.98px){.navbar-header .uc-brand-copy{display:none}.navbar-header .uc-brand-lockup img{width:34px;height:34px}}

/* =========================================================
   UltraClinic branding alignment + mobile single-scroll fix
   v1.1
   ========================================================= */
.sidebar .sidebar-logo{
  display:flex!important;
  align-items:center!important;
  gap:10px!important;
  min-height:78px!important;
  padding:14px 54px 14px 22px!important;
  overflow:hidden!important;
}
.sidebar .sidebar-logo>div{
  flex:1 1 auto!important;
  min-width:0!important;
  overflow:hidden!important;
}
.sidebar .uc-brand-lockup{
  width:100%!important;
  min-width:0!important;
  display:flex!important;
  align-items:center!important;
  gap:12px!important;
  overflow:hidden!important;
}
.sidebar .uc-brand-lockup>img{
  width:42px!important;
  height:42px!important;
  flex:0 0 42px!important;
  object-fit:contain!important;
  border-radius:9px!important;
}
.sidebar .uc-brand-copy{
  display:flex!important;
  flex:1 1 auto!important;
  min-width:0!important;
  max-width:100%!important;
  flex-direction:column!important;
  justify-content:center!important;
  align-items:flex-start!important;
  overflow:hidden!important;
}
.sidebar .uc-brand-name{
  display:block!important;
  width:100%!important;
  max-width:100%!important;
  margin:0!important;
  color:#fff!important;
  font-size:20px!important;
  font-weight:800!important;
  line-height:1.15!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
.sidebar .uc-brand-tagline{
  display:block!important;
  width:100%!important;
  max-width:100%!important;
  margin-top:4px!important;
  color:rgba(219,231,255,.68)!important;
  font-size:10.5px!important;
  font-weight:500!important;
  line-height:1.2!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
.sidebar .sidebar-logo .sidebar-close{
  top:18px!important;
  right:12px!important;
}

@media (max-width:991.98px){
  html.uc-drawer-open,
  body.uc-drawer-open{
    height:100dvh!important;
    overflow:hidden!important;
    overscroll-behavior:none!important;
  }

  /* The page must not scroll behind the open mobile drawer. */
  body.uc-drawer-open .main-wrapper,
  body.uc-drawer-open .page-wrapper{
    max-height:100dvh!important;
    overflow:hidden!important;
  }

  /* Sidebar shell itself never scrolls. Only sidebar-inner scrolls. */
  #sidebar.sidebar,
  .sidebar#sidebar{
    height:100dvh!important;
    max-height:100dvh!important;
    overflow:hidden!important;
    overscroll-behavior:contain!important;
  }

  #sidebar .sidebar-logo{
    height:78px!important;
    min-height:78px!important;
    flex:0 0 78px!important;
  }

  #sidebar .sidebar-inner{
    height:calc(100dvh - 78px)!important;
    max-height:calc(100dvh - 78px)!important;
    overflow:hidden!important;
  }

  /* SimpleBar remains the only scrolling area. Hide its decorative track
     so users never see a duplicate scrollbar next to the browser scrollbar. */
  #sidebar .sidebar-inner>.simplebar-wrapper,
  #sidebar .sidebar-inner .simplebar-mask,
  #sidebar .sidebar-inner .simplebar-offset{
    height:100%!important;
    max-height:100%!important;
  }

  #sidebar .sidebar-inner .simplebar-content-wrapper{
    height:100%!important;
    max-height:100%!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
    -webkit-overflow-scrolling:touch!important;
    overscroll-behavior:contain!important;
    scrollbar-width:none!important;
  }
  #sidebar .sidebar-inner .simplebar-content-wrapper::-webkit-scrollbar{
    width:0!important;
    height:0!important;
    display:none!important;
  }
  #sidebar .sidebar-inner .simplebar-track,
  #sidebar .sidebar-inner .simplebar-scrollbar,
  #sidebar .sidebar-inner .simplebar-track.simplebar-vertical,
  #sidebar .sidebar-inner .simplebar-track.simplebar-horizontal{
    display:none!important;
    opacity:0!important;
    pointer-events:none!important;
  }

  #sidebar .sidebar-menu,
  #sidebar .simplebar-content{
    overflow:visible!important;
    min-height:100%!important;
  }

  .sidebar .uc-brand-name{font-size:19px!important}
  .sidebar .uc-brand-tagline{font-size:10px!important}
}
