:root {
  color-scheme: light;
  --brand-blue: #2a93f6;
  --path-blue: #8bcaf7;
  --navy: #06192e;
  --ink: #102033;
  --muted: #647286;
  --line: #d7e1eb;
  --header: #ffffff;
  --background: #f6f9fc;
  --app-header-offset: 111px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  background: var(--background);
  color: var(--ink);
  margin: 0;
  min-height: 100vh;
}

button {
  font: inherit;
}

.app-shell {
  min-height: 100vh;
}

.app-header {
  align-items: center;
  background: var(--header);
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(160px, 0.8fr) minmax(0, 1.6fr);
  left: 0;
  min-height: var(--app-header-offset);
  padding: 16px 30px;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 50;
}

.brand-lockup {
  align-items: center;
  color: var(--navy);
  display: inline-flex;
  gap: 16px;
  justify-self: start;
  min-width: 0;
  text-decoration: none;
}

.brand-logo {
  display: block;
  flex: 0 0 auto;
  height: 78px;
  width: 78px;
}

.brand-name {
  color: var(--ink);
  font-family: "Plus Jakarta Sans", Avenir Next, Arial, sans-serif;
  font-size: 34px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
}

.header-actions {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  min-width: 0;
}

.tenant-control {
  align-items: center;
  color: var(--muted);
  display: inline-flex;
  gap: 9px;
  min-width: 0;
}

.tenant-control span,
.tenant-chip-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.tenant-control select {
  appearance: none;
  background:
    linear-gradient(45deg, transparent 50%, var(--ink) 50%) right 15px center / 7px 7px no-repeat,
    linear-gradient(135deg, var(--ink) 50%, transparent 50%) right 10px center / 7px 7px no-repeat,
    #ffffff;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 18px;
  font-weight: 600;
  min-height: 54px;
  min-width: 190px;
  padding: 0 32px 0 14px;
}

.tenant-control select:focus,
.sign-out-button:focus {
  outline: 3px solid rgba(42, 147, 246, 0.24);
  outline-offset: 2px;
}

.tenant-chip,
.user-chip {
  align-items: center;
  display: inline-flex;
  min-width: 0;
}

.tenant-chip {
  gap: 8px;
}

.tenant-chip-name,
.principal-label {
  color: var(--ink);
  display: inline-block;
  font-size: 18px;
  max-width: 230px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-chip {
  gap: 10px;
}

.user-avatar {
  background: var(--brand-blue);
  border-radius: 999px;
  color: #ffffff;
  display: inline-grid;
  flex: 0 0 auto;
  font-size: 0.82rem;
  font-weight: 800;
  height: 34px;
  place-items: center;
  width: 34px;
}

.sign-out-button {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  cursor: pointer;
  font-size: 24px;
  font-weight: 500;
  min-height: 54px;
  padding: 0 18px;
}

.sign-out-button:hover {
  border-color: var(--brand-blue);
  color: var(--brand-blue);
}

.blank-workspace {
  min-height: 100vh;
  padding-top: var(--app-header-offset);
}

.visually-hidden {
  clip: rect(0 0 0 0);
  border: 0;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

@media (max-width: 1360px) {
  :root {
    --app-header-offset: 88px;
  }

  .app-header {
    gap: 12px;
    padding: 10px 20px;
  }

  .brand-lockup {
    gap: 12px;
  }

  .brand-logo {
    height: 64px;
    width: 64px;
  }

  .brand-name {
    font-size: 30px;
  }

  .header-actions {
    flex-wrap: wrap;
    gap: 8px;
  }

  .principal-label {
    max-width: 150px;
  }
}

@media (max-width: 720px) {
  :root {
    --app-header-offset: 74px;
  }

  .app-header {
    align-items: center;
    display: grid;
    grid-template-columns: 1fr;
    padding: 9px 16px;
  }

  .brand-logo {
    height: 52px;
    width: 52px;
  }

  .brand-name {
    font-size: 28px;
  }

  .header-actions {
    align-items: stretch;
    flex-direction: column;
    justify-content: flex-start;
    width: 100%;
  }

  .tenant-control,
  .tenant-control select,
  .tenant-chip,
  .user-chip,
  .sign-out-button {
    width: 100%;
  }

  .tenant-control {
    align-items: stretch;
    flex-direction: column;
  }

  .tenant-chip,
  .user-chip {
    justify-content: center;
  }

  .tenant-chip-name,
  .principal-label {
    max-width: 100%;
  }

  .sign-out-button {
    font-size: 17px;
    min-height: 46px;
  }
}
