/* CampusToday brand — header logos, login, post-login boot screen */

.app-brand {
  gap: 0.5rem;
  min-height: 0;
  align-items: center;
  background: transparent !important;
}

/* Header left cluster: logo + sidebar toggle */
.header > .d-flex.align-items-center.justify-content-between {
  flex: 0 0 auto;
  min-width: 0;
  height: 60px;
  gap: 0.75rem;
  align-items: center !important;
  padding-right: 0.25rem;
}

.header > .d-flex.align-items-center {
  height: 100%;
  align-items: center !important;
}

.header .toggle-sidebar-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  margin: 0;
  padding: 0 0 0 0.25rem;
  line-height: 1;
  height: 60px;
}

/* Override NiceAdmin fixed 280px logo width */
.header .logo,
.header .logo.app-brand {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-start;
  height: 60px;
  line-height: 1;
  margin: 0;
  padding: 0;
  background: transparent !important;
  width: auto !important;
  min-width: 0;
  max-width: min(260px, 52vw);
  flex: 0 1 auto;
  overflow: hidden;
}

.header .logo.app-brand img {
  margin: 0 !important;
  vertical-align: middle;
  background: transparent !important;
}

.header .logo.app-brand-header-primary {
  max-width: min(300px, 58vw);
}

.header .logo.app-brand-header-primary img {
  max-height: 52px !important;
  height: 52px !important;
  width: auto !important;
  max-width: 100% !important;
  object-fit: contain;
  object-position: left center;
  display: block;
  margin: 0 !important;
  background: transparent !important;
}

.header .app-brand-wide {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  height: 52px;
  line-height: 0;
  max-width: 100%;
  background: transparent !important;
}

.header .app-brand-wide img {
  max-height: 52px !important;
  height: 52px !important;
  width: auto !important;
  max-width: 100% !important;
  object-fit: contain;
  object-position: left center;
  display: block;
  background: transparent !important;
}

.app-brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 8px;
  overflow: hidden;
  background: transparent !important;
}

.app-brand-mark img {
  width: auto;
  height: auto;
  max-width: 40px;
  max-height: 40px;
  object-fit: contain;
  object-position: center;
  margin: 0;
  display: block;
  background: transparent !important;
}

.app-brand-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px dashed #4154f1;
  background: #f6f9ff;
  color: #012970;
  font-family: "Nunito", sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
}

.app-brand-name {
  font-size: 18px !important;
  font-weight: 700;
  color: #012970;
  white-space: nowrap;
  line-height: 1;
}

.app-brand-wide {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  height: 44px;
  line-height: 0;
  background: transparent !important;
}

.app-brand-wide img {
  max-height: 44px;
  width: auto;
  max-width: min(220px, 46vw);
  object-fit: contain;
  object-position: left center;
  margin: 0;
  display: block;
  background: transparent !important;
}

/* Login page — centered logo + tagline */
.login-brand-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 0.5rem 1rem 1.25rem;
  background: transparent;
}

.app-brand-login {
  width: auto !important;
  max-width: 100%;
  justify-content: center;
  padding: 0;
  margin: 0 auto;
  background: transparent !important;
}

.app-brand-login img {
  width: auto !important;
  max-width: min(480px, 92vw) !important;
  max-height: 132px !important;
  height: auto !important;
  object-fit: contain;
  object-position: center center;
  display: block;
  margin: 0 auto !important;
  background: transparent !important;
}

.logo.app-brand-login img {
  max-height: 132px !important;
}

@media (min-width: 1200px) {
  .header .logo,
  .header .logo.app-brand {
    width: auto !important;
    min-width: 0;
    max-width: 280px !important;
  }
}

@media (max-width: 991.98px) {
  .header .logo.app-brand {
    height: 60px;
    max-width: min(200px, 52vw);
  }

  .header .logo.app-brand-header-primary {
    max-width: min(220px, 62vw);
  }

  .header .logo.app-brand-header-primary img {
    max-height: 44px !important;
    height: 44px !important;
  }

  .app-brand-mark,
  .app-brand-placeholder {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
  }

  .app-brand-mark img {
    max-width: 36px;
    max-height: 36px;
  }

  .header .app-brand-wide img {
    max-height: 40px !important;
    height: 40px !important;
    max-width: 100% !important;
  }
}

/* Post-login skeleton boot screen */
.portal-boot {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.45s ease, visibility 0.45s ease;
}

.portal-boot-hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.portal-boot-backdrop {
  position: absolute;
  inset: 0;
  background: #eef1f6;
}

.portal-boot-content {
  position: relative;
  z-index: 1;
  width: min(92vw, 720px);
  text-align: center;
}

.portal-boot-logo-wrap {
  position: relative;
  width: 128px;
  height: 128px;
  margin: 0 auto 1.25rem;
  border-radius: 22px;
  overflow: hidden;
  background: #dce3ec;
  box-shadow: inset 0 0 0 1px rgba(1, 39, 112, 0.06);
}

.portal-boot-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 14px;
  display: block;
  filter: grayscale(1) brightness(1.05);
  opacity: 0.5;
}

.portal-boot-logo-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 15%,
    rgba(255, 255, 255, 0.65) 48%,
    transparent 82%
  );
  animation: portal-boot-shimmer 1.5s ease-in-out infinite;
}

.portal-boot-text {
  color: #6c757d;
  font-size: 0.9rem;
  margin-bottom: 1.75rem;
}

.portal-boot-layout {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 1rem;
  text-align: left;
}

.portal-boot-sidebar {
  background: #fff;
  border-radius: 10px;
  padding: 1rem 0.75rem;
  box-shadow: 0 2px 12px rgba(1, 39, 112, 0.06);
}

.portal-boot-line {
  height: 12px;
  border-radius: 6px;
  margin-bottom: 0.65rem;
  background: linear-gradient(90deg, #e2e8f0 0%, #f1f5f9 50%, #e2e8f0 100%);
  background-size: 200% 100%;
  animation: portal-boot-skeleton 1.4s ease-in-out infinite;
}

.portal-boot-line:last-child {
  margin-bottom: 0;
}

.portal-boot-main {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.portal-boot-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.portal-boot-card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(1, 39, 112, 0.06);
  background-image: linear-gradient(90deg, #e2e8f0 0%, #f8fafc 50%, #e2e8f0 100%);
  background-size: 200% 100%;
  animation: portal-boot-skeleton 1.4s ease-in-out infinite;
}

.portal-boot-card-lg {
  height: 72px;
}

.portal-boot-card-md {
  height: 100px;
}

.portal-boot-card-sm {
  height: 56px;
}

@keyframes portal-boot-shimmer {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(120%); }
}

@keyframes portal-boot-skeleton {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@media (max-width: 575px) {
  .portal-boot-layout {
    grid-template-columns: 1fr;
  }

  .portal-boot-sidebar {
    display: none;
  }

  .portal-boot-row {
    grid-template-columns: 1fr;
  }

  .login-brand-wrap {
    max-width: 100%;
    padding-bottom: 1rem;
  }

  .app-brand-login img {
    max-width: 94vw !important;
    max-height: 112px !important;
  }
}
