.brand-avatar {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 50%;
  object-fit: cover;
}

.sidebar-foot {
  display: grid;
  gap: 6px;
  font-size: 12px;
  line-height: 1.4;
  padding-top: 10px;
  border-top: 1px solid #30424c;
  margin-top: auto;
}

.ceo-source-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #8fa2ab;
  font-size: 11px;
}

.ceo-heading-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

#ceo-source-count {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  color: #8fa2ab;
}

.ceo-foot-logout {
  color: #8fa2ab;
  font-size: 11px;
  text-decoration: none;
  cursor: pointer;
  padding: 1px 4px;
  border-radius: 3px;
  transition: all .15s ease;
}

.ceo-foot-logout:hover {
  color: #ff8b7b;
  text-decoration: underline;
}

.ceo-source {
  display: grid;
  gap: 2px;
  padding: 6px 0;
}

.ceo-source + .ceo-source {
  border-top: 1px solid #28373f;
}

.ceo-source-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ceo-source-name,
.ceo-source-empty strong {
  color: #d9e4e8;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 110px;
}

.sidebar-foot small {
  display: block;
  margin: 0;
  color: #8fa2ab;
  font-size: 11px;
  line-height: inherit;
}

.ceo-source-corporation {
  color: #8fa2ab;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 90px;
  text-align: right;
}

.ceo-source-time {
  color: #6d818a;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.ceo-source-state {
  color: #e06c75;
  font-size: 10px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.ceo-source-empty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 0;
  color: #6d818a;
}

.sidebar-foot #ceo-source-error[hidden] {
  display: none;
}

.ceo-source-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ceo-source-action {
  display: inline-block;
  padding: 0;
  border: 0;
  background: transparent;
  color: #69d5c9;
  font: inherit;
  font-size: 11px;
  line-height: inherit;
  text-decoration: none;
  cursor: pointer;
}

.ceo-source-action:hover,
.ceo-source-action:focus-visible {
  color: #ffffff;
  text-decoration: underline;
}

.ceo-source-action:disabled {
  opacity: .6;
  cursor: wait;
}

.ceo-source-action:disabled:hover {
  color: #69d5c9;
  text-decoration: none;
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10;
  height: 100vh;
  height: 100dvh;
  isolation: isolate;
  overflow: hidden;
}

.sidebar::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  pointer-events: none;
  background: url("assets/shengyao-zhuiying-avatar.png") center / cover no-repeat;
  opacity: 0.1;
}

.sidebar > * {
  position: relative;
  z-index: 0;
}

.main {
  position: relative;
  isolation: isolate;
}

.main::before {
  position: absolute;
  inset: 0;
  z-index: 0;
  content: "";
  pointer-events: none;
  background: url("assets/shengyao-zhuiying-avatar.png") center / cover no-repeat;
  opacity: 0.055;
}

.main > * {
  position: relative;
  z-index: 1;
}

.main > .user-watermark {
  --watermark-cell-width: 380px;
  --watermark-cell-height: 210px;
  position: fixed;
  inset: 0 0 0 var(--sidebar-width);
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(var(--watermark-columns, 1), minmax(0, 1fr));
  grid-template-rows: repeat(var(--watermark-rows, 1), minmax(0, 1fr));
  align-items: center;
  justify-items: center;
  overflow: hidden;
  color: rgba(18, 33, 44, 0.08);
  pointer-events: none;
  user-select: none;
}

.main > .user-watermark[hidden] {
  display: none;
}

dialog > .dialog-user-watermark {
  --watermark-cell-width: 340px;
  --watermark-cell-height: 190px;
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(var(--watermark-columns, 1), minmax(0, 1fr));
  grid-template-rows: repeat(var(--watermark-rows, 1), minmax(0, 1fr));
  align-items: center;
  justify-items: center;
  overflow: hidden;
  border-radius: inherit;
  color: rgba(18, 33, 44, 0.08);
  pointer-events: none;
  user-select: none;
}

.user-watermark-item {
  display: block;
  max-width: 92%;
  overflow: hidden;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1.3;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  transform: rotate(-24deg);
}

@media (max-width: 540px) {
  .main > .user-watermark {
    --watermark-cell-width: 420px;
    --watermark-cell-height: 190px;
  }

  dialog > .dialog-user-watermark {
    --watermark-cell-width: 420px;
    --watermark-cell-height: 170px;
  }

  .user-watermark-item {
    font-size: 20px;
    letter-spacing: 0.04em;
  }
}

@media print {
  .main > .user-watermark {
    inset-inline-start: 0;
    color: rgba(0, 0, 0, 0.08);
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}
