.sc-shell-brand {
  display: flex;
  align-items: center;
  min-width: 0;
}

.sc-shell-brand img {
  display: block;
  max-width: 100%;
  object-fit: contain;
  object-position: left center;
}

.sc-shell-brand [hidden] { display: none !important; }

.sc-shell-brand.has-tenant-logo .sc-shell-brand-custom {
  box-sizing: border-box;
  padding: 4px 7px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.96);
}

.sc-shell-brand-powered {
  color: rgba(255, 255, 255, 0.64);
  font: 500 9px/1.2 "IBM Plex Mono", monospace;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.sc-shell-brand-powered strong {
  color: rgba(255, 255, 255, 0.92);
  font-weight: 700;
}

.sc-branding-modal {
  position: fixed;
  inset: 0;
  z-index: 25000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(7, 17, 31, 0.72);
  backdrop-filter: blur(8px);
}

.sc-branding-card {
  width: min(560px, 100%);
  overflow: hidden;
  border: 1px solid #dbe3ec;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 28px 90px rgba(7, 17, 31, 0.3);
}

.sc-branding-head,
.sc-branding-body,
.sc-branding-actions { padding: 20px 24px; }
.sc-branding-head { background: #07111f; color: #fff; }
.sc-branding-head h2 { margin: 0 0 4px; font-size: 20px; }
.sc-branding-head p { margin: 0; color: #9fb0bf; font-size: 13px; }
.sc-branding-preview {
  display: grid;
  place-items: center;
  min-height: 150px;
  margin-bottom: 16px;
  padding: 20px;
  border: 1px dashed #aab8c5;
  border-radius: 12px;
  background: #f6f8f2;
}
.sc-branding-preview img { max-width: 100%; max-height: 120px; object-fit: contain; }
.sc-branding-preview span { color: #64748b; font-size: 13px; }
.sc-branding-file { width: 100%; padding: 11px; border: 1px solid #dbe3ec; border-radius: 9px; }
.sc-branding-help { margin: 9px 0 0; color: #64748b; font-size: 12px; line-height: 1.5; }
.sc-branding-actions { display: flex; justify-content: space-between; gap: 10px; border-top: 1px solid #e5e7eb; }
.sc-branding-actions > div { display: flex; gap: 8px; }

@media (min-width: 901px) {
  #mainApp .workspace-nav > .sc-shell-brand,
  #dgApp .workspace-nav > .sc-shell-brand {
    position: absolute;
    top: 14px;
    left: 18px;
    right: 18px;
    height: 56px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 4px;
  }
  .workspace-nav > .sc-shell-brand .sc-shell-brand-default { width: 174px; height: 38px; }
  .workspace-nav > .sc-shell-brand .sc-shell-brand-custom { max-width: 190px; max-height: 38px; }
}

@media (max-width: 900px) {
  .header .sc-shell-brand { flex-direction: column; align-items: flex-start; gap: 2px; }
  .header .sc-shell-brand img { max-width: 175px; max-height: 42px; }
  .header .sc-shell-brand-powered { color: #64748b; font-size: 8px; }
  .header .sc-shell-brand-powered strong { color: #263547; }
  .workspace-nav > .sc-shell-brand { display: none; }
}
