/* ========================================================================
   ND's brand lockup
   ------------------------------------------------------------------------
   Light surfaces use assets/brand/45.png.
   Dark surfaces use assets/brand/46.png.
   Both originals are rendered as-is with preserved aspect ratio.
   ======================================================================== */

.nds-brand{
  display:inline-flex;
  align-items:center;
  justify-content:flex-start;
  min-width:0;
  max-width:100%;
  text-decoration:none;
  line-height:1;
}

.nds-logo-img{
  display:block;
  height:var(--logo-h,48px);
  width:auto;
  max-width:100%;
  object-fit:contain;
  object-position:left center;
  flex:none;
}

.nds-brand-lg{--logo-h:88px}

/* Generic fallbacks only. Dedicated 46.png is rendered directly on dark UI. */
.nds-brand-plate{
  padding:6px 9px;
  border-radius:10px;
  background:#fff;
  box-shadow:0 1px 2px rgba(0,0,0,.08);
}

/* ---- Login / setup: light surface -> 45.png ----------------------------- */
.auth-logo-panel{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  min-height:0 !important;
  height:auto !important;
  margin:0 0 24px !important;
  padding:0 !important;
  overflow:visible !important;
  background:transparent !important;
  border:0 !important;
  box-shadow:none !important;
}
.auth-logo-panel .nds-brand{
  --logo-h:92px;
  padding:0;
  background:transparent;
  border-radius:0;
  box-shadow:none;
}
.auth-logo-panel .nds-logo-img{
  height:92px;
  width:auto;
  max-width:170px;
  object-fit:contain;
  object-position:left center;
}

/* ---- Text fallback ------------------------------------------------------ */
.nds-brand-textonly .nds-wordmark{
  display:block;
  font-size:15px;
  font-weight:650;
  letter-spacing:-.01em;
  line-height:1.3;
  overflow-wrap:anywhere;
}
.nds-brand-lg.nds-brand-textonly .nds-wordmark{font-size:19px}
.nds-brand-dark.nds-brand-textonly{color:#fff}
.nds-brand-light.nds-brand-textonly{color:var(--text-primary,#17171c)}

/* ---- Desktop sidebar: dark surface -> 46.png ----------------------------
   Deliberately prominent but still subordinate to the navigation. The image
   stays proportional and gets enough breathing room to read at a glance. */
.sidebar .brand{
  align-items:center;
  justify-content:flex-start;
  min-height:112px;
  padding-top:8px;
  padding-bottom:18px;
}
.sidebar .nds-brand{
  --logo-h:94px;
  max-width:232px;
}
.sidebar .nds-logo-img{
  height:94px;
  width:auto;
  max-width:232px;
  object-fit:contain;
  object-position:left center;
}
.sidebar .nds-brand-plate{padding:6px 8px}

/* ---- Mobile topbar: light surface -> 45.png ----------------------------- */
.topbar .nds-brand{
  --logo-h:36px;
  max-width:112px;
}
.topbar .nds-logo-img{
  height:36px;
  width:auto;
  max-width:112px;
  object-fit:contain;
  object-position:left center;
}
.topbar .nds-brand-plate{padding:4px 6px;border-radius:8px}

@media (max-width:560px){
  .sidebar .brand{
    min-height:94px;
    padding-top:6px;
    padding-bottom:14px;
  }
  .sidebar .nds-brand,
  .sidebar .nds-logo-img{
    --logo-h:76px;
    height:76px;
    max-width:204px;
  }
  .topbar .nds-brand,
  .topbar .nds-logo-img{
    --logo-h:32px;
    height:32px;
    max-width:102px;
  }
  .nds-brand-lg{--logo-h:72px}
  .auth-logo-panel .nds-brand,
  .auth-logo-panel .nds-logo-img{
    --logo-h:76px;
    height:76px;
    max-width:142px;
  }
  .nds-brand-textonly .nds-wordmark{font-size:14px}
}
