html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: sans-serif;
  background: #f7f9fc;
}

.has-app-header {
  padding-top: 64px;
}

#app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 12px 24px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
  z-index: 1200;
  backdrop-filter: blur(6px);
}

#app-header .header-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.1rem;
  font-weight: 700;
  color: #1e2a38;
  text-decoration: none;
}

#app-header .header-logo img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

#app-header .header-logo span {
  line-height: 1;
}

#app-header .header-user {
  font-size: 0.95rem;
  font-weight: 600;
  color: #1e2a38;
  text-align: right;
}

#app-header .header-right {
  display: flex;
  align-items: center;
  gap: 18px;
}

#app-header .header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

#app-header .header-account,
#app-header .header-help,
#app-header .header-logout {
  padding: 8px 18px;
  border: none;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

#app-header .header-account {
  background-color: #e3eaf3;
  color: #1e2a38;
}

#app-header .header-account:hover,
#app-header .header-account.active {
  background-color: #cfd9ea;
}

#app-header .header-help {
  background-color: #e8f1ff;
  color: #1e2a38;
}

#app-header .header-help:hover {
  background-color: #d4e4ff;
}

#app-header .header-logout {
  background-color: #ff6b6b;
  color: #fff;
}

#app-header .header-logout:hover {
  background-color: #e25555;
}

/* Skeleton utility */
.skeleton-block {
  background-color: #e5ebf3;
  background-image: linear-gradient(
    90deg,
    rgba(229, 235, 243, 0),
    rgba(255, 255, 255, 0.7),
    rgba(229, 235, 243, 0)
  );
  background-size: 200px 100%;
  animation: skeleton-shimmer 1.1s ease-in-out infinite;
}

@keyframes skeleton-shimmer {
  0% {
    background-position: -200px 0;
  }
  100% {
    background-position: calc(200px + 100%) 0;
  }
}

html[data-theme="dark"] {
  color-scheme: dark;
  background: #0b1120;
}

html[data-theme="dark"] body {
  background: #0b1120;
  color: #e2e8f0;
}

html[data-theme="dark"] #app-header {
  background: rgba(15, 23, 42, 0.92);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

html[data-theme="dark"] #app-header .header-logo,
html[data-theme="dark"] #app-header .header-user {
  color: #e2e8f0;
}

html[data-theme="dark"] #app-header .header-account {
  background-color: #1f2937;
  color: #e2e8f0;
}

html[data-theme="dark"] #app-header .header-account:hover,
html[data-theme="dark"] #app-header .header-account.active {
  background-color: #2b3648;
}

html[data-theme="dark"] #app-header .header-help {
  background-color: #1e293b;
  color: #e2e8f0;
}

html[data-theme="dark"] #app-header .header-help:hover {
  background-color: #334155;
}

html[data-theme="dark"] #app-header .header-logout {
  background-color: #dc2626;
}

html[data-theme="dark"] #app-header .header-logout:hover {
  background-color: #b91c1c;
}

html[data-theme="dark"] .skeleton-block {
  background-color: #1f2937;
  background-image: linear-gradient(
    90deg,
    rgba(31, 41, 55, 0),
    rgba(148, 163, 184, 0.35),
    rgba(31, 41, 55, 0)
  );
}
