/* ==========================================================================
   Physician Lab Services — Application shell
   ========================================================================== */

.app-header {
  background: var(--pls-white) !important;
  border-bottom: 1px solid var(--pls-border);
  box-shadow: none !important;
  height: var(--pls-header-height);
  min-height: var(--pls-header-height);
}

.app-header .brand {
  background: transparent;
  border-right: 0;
}

.app:not(.guest-public-app):not(.pls-auth-app) .app-header .brand .brand-logo {
  display: none;
}

.app-header .desktop-toggler .menu-toggler,
.app-header .mobile-toggler .menu-toggler {
  color: var(--pls-navy);
}

.app-header .desktop-toggler .menu-toggler .bar,
.app-header .mobile-toggler .menu-toggler .bar {
  background: var(--pls-navy);
}

.app-header .menu {
  flex: 1 1 auto;
}

.app-header .menu .menu-search {
  max-width: 520px;
  flex: 1 1 auto;
  margin-right: auto;
}

.app-header .menu .menu-search .form-control {
  background: var(--pls-fog);
  border: 1px solid #e7ebf0;
  border-radius: var(--pls-radius-md);
  min-height: 40px;
  height: 40px;
  padding-left: 0.25rem;
  box-shadow: none;
  font-size: 14px;
  font-weight: 400;
}

.app-header .menu .menu-search .form-control:focus {
  background: var(--pls-white);
  border-color: rgba(15, 42, 68, 0.25);
  box-shadow: 0 0 0 3px rgba(34, 184, 166, 0.08);
}

.app-header .menu .menu-search-icon {
  color: var(--pls-text-muted);
}

.app-header .menu .menu-item .menu-link {
  gap: 0.6rem;
}

.app-header .menu .menu-img {
  width: 2rem;
  height: 2rem;
}

.app-header .menu .menu-img span {
  background: var(--pls-navy) !important;
  font-weight: 600;
  font-size: 0.8rem;
}

.app-header .menu .menu-text {
  font-weight: 500;
  font-size: 14px;
  color: var(--pls-text-primary);
}

.app-header .pls-header-icon {
  width: 40px;
  height: 40px;
  color: var(--pls-navy);
  justify-content: center;
}

.app-header .pls-header-icon i {
  font-size: 1rem;
}

.pls-notify-menu {
  min-width: 240px;
}

.app-header .pls-header-logo {
  display: none;
}

.app-sidebar {
  background: var(--pls-sidebar-bg) !important;
  border-right: 1px solid var(--pls-border) !important;
  padding-top: 0;
}

.app-sidebar .app-sidebar-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  padding: 1rem 0.75rem 1rem;
  background: var(--pls-sidebar-bg) !important;
}

.app-sidebar .menu {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

.pls-brand-lockup {
  display: block;
  height: 44px;
  width: auto;
}

.pls-brand-letters {
  display: block;
  height: 20px;
  width: auto;
}

.pls-sidebar-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  padding: 0.25rem 0.5rem 1rem;
  text-decoration: none;
  color: var(--pls-navy);
}

.pls-sidebar-brand:hover {
  color: var(--pls-navy);
}

.pls-sidebar-lockup {
  display: block;
  height: 72px;
  width: auto;
}

.pls-sidebar-letters {
  display: none;
  height: 16px;
  width: auto;
}

.pls-sidebar-brand-mark {
  width: auto;
  height: 22px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pls-sidebar-brand-mark img {
  width: auto;
  height: 22px;
  display: block;
}

.pls-sidebar-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.pls-sidebar-brand-text strong {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.pls-sidebar-brand-text span {
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #546176;
}

.app-sidebar .menu-header {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pls-text-muted);
  padding: 0.9rem 0.6rem 0.3rem;
}

.app-sidebar .pls-sidebar-brand + .menu-header,
.app-sidebar .menu > .menu-header:first-of-type {
  padding-top: 0.15rem;
}

.app-sidebar .menu-item .menu-link,
.pls-nav-link {
  color: #546176 !important;
  border-radius: 8px !important;
  margin-bottom: 0.15rem;
  font-weight: 500;
  font-size: 14px;
  min-height: 36px;
  position: relative;
  display: flex;
  align-items: center;
}

.app-sidebar .menu-item .menu-link:hover {
  background: rgba(255, 255, 255, 0.72) !important;
  color: #18212f !important;
}

.app-sidebar .menu-item.active > .menu-link,
.app-sidebar .menu-item.active > .menu-link:hover {
  background: rgba(26, 174, 159, 0.14) !important;
  color: var(--pls-navy) !important;
  font-weight: 600;
  box-shadow: none;
}

.app-sidebar .menu-item.active > .menu-link::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 0 2px 2px 0;
  background: var(--pls-teal);
}

.app-sidebar .menu-item.has-sub .menu-submenu {
  display: none;
  padding: 0.15rem 0 0.35rem 0.35rem;
}

.app-sidebar .menu-item.has-sub.expand .menu-submenu,
.app-sidebar .menu-item.has-sub.active .menu-submenu {
  display: block;
}

.app-sidebar .menu-submenu .menu-item .menu-link {
  min-height: 34px;
  font-size: 13px;
  padding-left: 2.1rem !important;
}

.app-sidebar .menu-text {
  flex: 1 1 auto;
}

.pls-nav-badge {
  margin-left: 0.35rem;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: var(--pls-navy);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.app-sidebar .menu-divider {
  border-color: var(--pls-border);
}

.pls-sidebar-footer {
  margin-top: auto;
  padding-top: 0.75rem;
  flex: 0 0 auto;
}

.pls-sidebar-user {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.6rem;
  border-radius: 8px;
  color: var(--pls-text-primary);
  text-decoration: none;
}

.pls-sidebar-user:hover {
  background: #f5f7f8;
  color: var(--pls-text-primary);
}

.pls-sidebar-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--pls-icon-well);
  color: var(--pls-navy);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex: 0 0 auto;
}

.pls-sidebar-user-name {
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.2;
}

.pls-sidebar-user-role {
  font-size: 0.72rem;
  color: var(--pls-text-secondary);
}

.app-sidebar-mobile-backdrop {
  background: rgba(15, 42, 68, 0.28) !important;
}

@media (min-width: 768px) {
  .app:not(.guest-public-app):not(.pls-auth-app) .app-sidebar {
    top: 0 !important;
    height: 100% !important;
    z-index: 1040;
  }

  .app:not(.app-sidebar-minified):not(.guest-public-app):not(.pls-auth-app) .app-header {
    margin-left: var(--pls-sidebar-width);
    width: calc(100% - var(--pls-sidebar-width));
    padding-left: 0.75rem;
  }

  .app:not(.app-sidebar-minified):not(.guest-public-app):not(.pls-auth-app) .app-header .brand {
    display: none;
  }

  .app:not(.app-sidebar-minified):not(.guest-public-app):not(.pls-auth-app) .app-content {
    margin-left: var(--pls-sidebar-width);
  }

  .app.app-sidebar-minified:not(.guest-public-app):not(.pls-auth-app) .app-sidebar {
    top: 0 !important;
    height: 100% !important;
  }

  .app.app-sidebar-minified .pls-sidebar-brand-text,
  .app.app-sidebar-minified .pls-sidebar-lockup,
  .app.app-sidebar-minified .pls-sidebar-user-copy,
  .app.app-sidebar-minified .hide-on-minified,
  .app.app-sidebar-minified .menu-header {
    display: none;
  }

  .app.app-sidebar-minified .pls-sidebar-letters {
    display: block;
  }
}

.app-content {
  background: var(--pls-page-bg);
  padding: 28px 32px 40px;
  max-width: none;
}

.app-content > * {
  max-width: var(--pls-content-max);
}

.pls-portal-nav,
.customer-dashboard-nav {
  background: var(--pls-white);
  border: 1px solid var(--pls-border);
  border-radius: var(--pls-radius-lg);
  box-shadow: var(--pls-shadow-xs);
  display: grid;
  gap: 0.25rem;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  padding: 0.3rem;
  margin-bottom: 1.25rem;
}

.pls-portal-nav-link,
.customer-dashboard-nav-link {
  border-radius: 8px;
  color: #546176;
  font-weight: 500;
  font-size: 0.8125rem;
  padding: 0.7rem 0.5rem;
  text-align: center;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  transition: background var(--pls-transition), color var(--pls-transition);
}

.pls-portal-nav-link i,
.customer-dashboard-nav-link i {
  font-size: 0.95rem;
}

.pls-portal-nav-link:hover,
.customer-dashboard-nav-link:hover {
  background: #f5f7f8;
  color: var(--pls-text-primary);
}

.pls-portal-nav-link.active,
.customer-dashboard-nav-link.active {
  background: #f0f4f7;
  color: var(--pls-navy);
  font-weight: 600;
  box-shadow: none;
}

.guest-public-app .app-header .brand {
  background: transparent;
}

.guest-public-app .app-header .brand .brand-logo,
.pls-auth-app .app-header .brand .brand-logo {
  display: inline-flex;
  align-items: center;
}

.guest-public-app .app-header .desktop-toggler,
.guest-public-app .app-header .mobile-toggler,
.pls-auth-app .app-header .desktop-toggler,
.pls-auth-app .app-header .mobile-toggler {
  display: none !important;
}

.guest-public-app .app-content,
.pls-auth-app .app-content {
  margin-left: 0 !important;
}

.guest-public-menu {
  align-items: center;
  display: flex;
  gap: 0.25rem;
  margin-right: 0.75rem;
}

.guest-public-link {
  border-radius: 8px;
  color: var(--pls-text-secondary);
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.4rem 0.75rem;
  text-decoration: none;
}

.guest-public-link:hover {
  background: var(--pls-fog);
  color: var(--pls-navy);
}

.pls-tabbar {
  display: none;
}

.pls-tabbar-item {
  appearance: none;
  background: transparent;
  border: 0;
  color: #546176;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  font-size: 0.68rem;
  font-weight: 500;
  font-family: inherit;
  min-height: 52px;
  padding: 0.35rem 0.25rem;
}

.pls-tabbar-item i {
  font-size: 1.05rem;
}

.pls-tabbar-item:hover,
.pls-tabbar-item.active {
  color: var(--pls-navy);
}

.pls-tabbar-item.active {
  font-weight: 600;
}
