:root {
  --shell-nav-height: 56px;
  --shell-bg: rgba(249, 247, 243, 0.88);
  --shell-surface: #fff;
  --shell-text: #202020;
  --shell-muted: #8d8d8d;
  --shell-brand: #26d7c4;
  --shell-brand-deep: #1aa8a0;
  --shell-brand-soft: rgba(38, 215, 196, 0.14);
  --shell-line: rgba(32, 32, 32, 0.07);
  --shell-font: "Microsoft YaHei", "Noto Sans SC", "PingFang SC", "Segoe UI", system-ui, sans-serif;
  --shell-mono: "Cascadia Mono", "JetBrains Mono", ui-monospace, monospace;
}

.lingjing-product-nav {
  position: sticky;
  top: 0;
  z-index: 2147483000;
  width: 100%;
  min-height: 56px;
  height: auto;
  border-bottom: 1px solid var(--shell-line);
  background: var(--shell-bg);
  color: var(--shell-text);
  font-family: var(--shell-font);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.lingjing-product-nav * {
  box-sizing: border-box;
}

.lingjing-nav-inner {
  display: flex;
  width: min(1680px, 100%);
  min-height: 56px;
  height: auto;
  align-items: center;
  margin: 0 auto;
  padding: 0 24px;
}

.lingjing-nav-logo {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
  margin-right: 24px;
  color: var(--shell-text);
  text-decoration: none;
}

.lingjing-nav-logo-icon {
  display: flex;
  width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid rgba(32, 32, 32, 0.08);
  border-radius: 8px;
  background: var(--shell-surface);
  box-shadow: 0 8px 20px rgba(25, 24, 21, 0.08);
}

.lingjing-nav-logo-icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lingjing-nav-logo-text {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0;
  white-space: nowrap;
}

.lingjing-nav-items {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  padding: 6px 0;
  overflow: visible;
}

.lingjing-nav-items::-webkit-scrollbar {
  display: none;
}

.lingjing-nav-item {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 32px;
  padding: 7px 10px;
  border-radius: 6px;
  color: var(--shell-muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.18s ease, background 0.18s ease;
}

.lingjing-nav-item:hover,
.lingjing-nav-item:focus-visible {
  color: var(--shell-brand);
  background: rgba(38, 215, 196, 0.07);
  outline: none;
}

.lingjing-nav-item.active {
  color: var(--shell-text);
  background: var(--shell-brand-soft);
}

.lingjing-nav-item-icon {
  display: inline-flex;
  width: 15px;
  height: 15px;
  align-items: center;
  justify-content: center;
  color: currentColor;
  opacity: 0.74;
}

.lingjing-nav-item.active .lingjing-nav-item-icon,
.lingjing-nav-item:hover .lingjing-nav-item-icon,
.lingjing-nav-item:focus-visible .lingjing-nav-item-icon {
  opacity: 1;
}

.lingjing-nav-item-label {
  display: inline-block;
}

.lingjing-nav-item .dot {
  position: absolute;
  bottom: -1px;
  left: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--shell-brand);
  opacity: 0;
  transform: translateX(-50%);
  transition: opacity 0.2s ease;
}

.lingjing-nav-item.active .dot {
  width: 4px;
  height: 4px;
  opacity: 1;
}

.lingjing-nav-right {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.lingjing-theme-btn,
.lingjing-logout-btn {
  display: flex;
  width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--shell-muted);
  cursor: pointer;
  text-decoration: none;
}

.lingjing-theme-btn:hover,
.lingjing-logout-btn:hover,
.lingjing-theme-btn:focus-visible,
.lingjing-logout-btn:focus-visible {
  background: var(--shell-line);
  color: var(--shell-text);
  outline: none;
}

.lingjing-user-name {
  color: #575757;
  font-size: 12px;
  font-weight: 600;
}

.lingjing-admin-link {
  color: var(--shell-muted);
  font-size: 12px;
  white-space: nowrap;
  text-decoration: none;
  padding: 6px 8px;
  border-radius: 6px;
}

.lingjing-admin-link:hover,
.lingjing-admin-link:focus-visible {
  background: var(--shell-line);
  color: var(--shell-text);
}

.lingjing-user-avatar {
  display: flex;
  width: 26px;
  height: 26px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--shell-brand), #6366f1);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
}

.service-nav {
  display: none !important;
}

body.has-lingjing-product-shell {
  min-height: 100vh;
}

.lingjing-tab-frame-host {
  position: fixed;
  top: var(--shell-nav-height, 56px);
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2147482000;
  display: none;
  background: #fff;
}

.lingjing-tab-frame-host.active {
  display: block;
}

.lingjing-tab-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

.lingjing-tab-frame[hidden] {
  display: none;
}

body.lingjing-tab-frame-open {
  overflow: hidden;
}

html.lingjing-embedded-frame .lingjing-product-nav {
  display: none !important;
}

@media (max-width: 980px) {
  .lingjing-nav-inner {
    padding: 0 12px;
  }

  .lingjing-nav-logo {
    margin-right: 10px;
  }

  .lingjing-nav-item {
    padding: 6px 8px;
    font-size: 12px;
  }

  .lingjing-nav-item-icon {
    width: 14px;
    height: 14px;
  }

  .lingjing-user-name {
    display: none;
  }
}

/* Keep every service reachable when all administrator menus are visible. */
@media (max-width: 1500px) {
  .lingjing-nav-inner { padding: 0 16px; }
  .lingjing-nav-logo { margin-right: 12px; }
  .lingjing-nav-item { padding: 7px 6px; gap: 4px; font-size: 12px; }
  .lingjing-nav-right { gap: 4px; margin-left: 8px; }
}

@media (max-width: 800px) {
  .lingjing-nav-inner { flex-wrap: wrap; padding: 6px 12px; }
  .lingjing-nav-items { order: 3; flex: 1 0 100%; padding: 6px 0 0; }
  .lingjing-nav-right { margin-left: auto; }
}
