/* Keep the supplied symbol, but render the wordmark as crisp browser text. */
.app-brand {
  display: flex !important;
  align-items: center;
  gap: 6px;
  width: min(100%, 214px) !important;
  height: 60px !important;
  flex: 0 0 auto;
  overflow: hidden;
  color: #17231f !important;
  white-space: nowrap;
  background: none !important;
}

.app-brand:not([data-crisp-wordmark]) {
  color: transparent !important;
  font-size: 0 !important;
}

.app-brand .brand-symbol {
  display: block;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  background: url("../pwa/logo-symbol.png") center / contain no-repeat;
  background-image: image-set(
    url("../pwa/logo-symbol.png") 1x,
    url("../pwa/logo-symbol@2x.png") 2x
  );
}

.app-brand .brand-wordmark {
  display: block;
  color: #17231f;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: -.65px;
  line-height: 1;
  white-space: nowrap;
}

.app-brand .brand-wordmark b {
  color: #e52330;
  font: inherit;
}

/* Neutralize the legacy divider styling applied to every span inside .brand. */
.app-brand > .brand-symbol,
.app-brand > .brand-wordmark {
  margin-left: 0 !important;
  padding-left: 0 !important;
  border-left: 0 !important;
  vertical-align: initial !important;
}

.welcome .app-brand {
  width: min(100%, 320px) !important;
  height: 76px !important;
  gap: 8px;
}
.welcome .app-brand .brand-symbol { flex-basis: 60px; width: 60px; height: 60px; }
.welcome .app-brand .brand-wordmark { font-size: 22px; letter-spacing: -.85px; }

.welcome .welcome-intro {
  background: #fff !important;
  color: #17231f !important;
}
.welcome .welcome-intro h1,
.welcome .welcome-intro p { color: #17231f !important; }
.welcome .welcome-intro .eyebrow { color: #bd202c !important; }

/* Login is one calm, centered column: logo first, then the existing form. */
body .welcome {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  min-height: 100dvh;
  padding: clamp(24px, 4vh, 42px) 20px 32px;
  background: #fff;
}
body .welcome .welcome-intro {
  display: block;
  width: min(100%, 440px);
  min-height: 0;
  padding: 0;
  background: transparent !important;
}
body .welcome .welcome-intro > :not(.app-brand) { display: none !important; }
body .welcome .welcome-intro .app-brand { margin: 0 auto; }
body .welcome .login-area {
  display: block;
  width: min(100%, 440px);
  padding: 0;
}
body .welcome .login-box { width: 100%; max-width: none; }

@media screen and (max-width: 700px) {
  body .welcome { padding: 24px 18px; }
  body .welcome .app-brand { width: min(100%, 280px) !important; height: 66px !important; }
  body .welcome .app-brand .brand-symbol { flex-basis: 52px; width: 52px; height: 52px; }
  body .welcome .app-brand .brand-wordmark { font-size: 19px; letter-spacing: -.7px; }
}

.mobile-brand.app-brand {
  width: 225px !important;
  height: 52px !important;
  gap: 5px;
}
.mobile-brand.app-brand .brand-symbol { flex-basis: 43px; width: 43px; height: 43px; }
.mobile-brand.app-brand .brand-wordmark { font-size: 15.5px; letter-spacing: -.6px; }

@media screen and (max-width: 370px) {
  .app .topbar { padding-inline: 9px; }
  .mobile-brand.app-brand { width: min(215px, calc(100vw - 138px)) !important; height: 52px !important; }
}

@media screen and (min-width: 701px) {
  /* The top-bar copy is mobile-only; desktop keeps the breadcrumb at the left. */
  .mobile-brand.app-brand { display: none !important; }
  .app .sidebar { padding-top: 10px; }
  .app .sidebar::after {
    content: "";
    position: absolute;
    z-index: 1;
    top: 79px;
    left: 0;
    right: 0;
    border-top: 1px solid #dce2df;
    pointer-events: none;
  }
  .app .sidebar > .app-brand {
    width: 100% !important;
    height: 60px !important;
    margin-left: -13px;
    justify-content: flex-start;
    text-align: left !important;
  }
  .app .sidebar > .app-brand .brand-wordmark {
    font-size: 14.5px !important;
    letter-spacing: -.6px;
  }
  /* Join the sidebar divider to the bottom edge of the 80px desktop top bar. */
  .app .sidebar .workspace-name { margin: 12px 0 30px; border-top: 0; }
}

@media print {
  .app-brand .brand-symbol { background-image: url("../pwa/logo-symbol.png") !important; }
}
