[hidden] {
  display: none !important;
}

:root {
  color-scheme: dark;
  --bg: #10131f;
  --surface: rgba(25, 29, 45, 0.72);
  --surface-solid: #1a1f30;
  --text: #f4f6fd;
  --muted: #9099b1;
  --line: rgba(255, 255, 255, 0.09);
  --accent: #8692ff;
  --accent-soft: rgba(134, 146, 255, 0.14);
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.24);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}
html[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f6fb;
  --surface: rgba(255, 255, 255, 0.78);
  --surface-solid: #fff;
  --text: #182035;
  --muted: #768097;
  --line: rgba(29, 42, 75, 0.1);
  --accent: #5866df;
  --accent-soft: rgba(88, 102, 223, 0.1);
  --shadow: 0 18px 55px rgba(56, 68, 105, 0.11);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}
.app-shell {
  overflow-x: hidden;
}
.ambient {
  position: fixed;
  width: 560px;
  height: 560px;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.18;
  pointer-events: none;
}
.ambient-one {
  background: #5b6cff;
  left: -160px;
  top: -230px;
}
.ambient-two {
  background: #be72ff;
  right: -220px;
  bottom: -320px;
}
.container {
  position: relative;
  max-width: 1280px;
  margin: auto;
  padding: 26px 42px 90px;
}
.topbar {
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-size: 17px;
  font-weight: 760;
  letter-spacing: -0.4px;
}
.brand-mark {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: linear-gradient(140deg, #a6afff, #6574fa 55%, #a465ee);
  font-family: Georgia, serif;
  color: white;
  font-weight: bold;
}
.top-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}
.clock {
  font-size: 13px;
  color: var(--muted);
  margin-right: 9px;
}
.icon-button,
.admin-link {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  height: 34px;
  border-radius: 10px;
  padding: 0 12px;
  text-decoration: none;
  font: 600 13px inherit;
  cursor: pointer;
}
.icon-button {
  font-size: 18px;
  padding: 0 10px;
}
.welcome {
  padding: 99px 0 55px;
  max-width: 720px;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 1.6px;
  color: var(--accent);
  font-weight: 800;
  margin: 0 0 14px;
}
.welcome h1,
.login-card h1 {
  letter-spacing: -2.4px;
  font-size: 42px;
  line-height: 1.1;
  margin: 0 0 14px;
}
.welcome > p,
.login-card > p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}
.search {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: 16px;
  height: 58px;
  margin-top: 36px;
  max-width: 650px;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 0 16px;
  color: var(--muted);
}
.search > span {
  font: 32px/1 Georgia;
}
.search input {
  font: 15px inherit;
  flex: 1;
  border: 0;
  outline: 0;
  background: none;
  color: var(--text);
  min-width: 0;
}
.search kbd {
  font: 11px inherit;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 3px 5px;
  color: var(--muted);
}
.navigation {
  display: grid;
  gap: 38px;
}
.group-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.group-heading h2 {
  font-size: 16px;
  margin: 0;
  letter-spacing: -0.3px;
}
.group-icon {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  font-size: 13px;
}
.count {
  font-size: 11px;
  color: var(--muted);
  margin-left: 1px;
}
.cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 11px;
}
.nav-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 16px;
  display: flex;
  gap: 12px;
  align-items: center;
  min-width: 0;
  text-decoration: none;
  color: var(--text);
  transition:
    0.18s transform,
    0.18s background,
    0.18s border-color;
}
.nav-card:hover {
  transform: translateY(-3px);
  background: var(--surface-solid);
  border-color: rgba(134, 146, 255, 0.45);
}
.site-icon {
  flex: 0 0 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  overflow: hidden;
  color: var(--accent);
}
.site-icon img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}
.card-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}
.card-copy strong {
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-copy small {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.arrow {
  margin-left: auto;
  color: var(--muted);
  font-size: 14px;
}
.empty {
  border: 1px dashed var(--line);
  border-radius: 18px;
  min-height: 210px;
  text-align: center;
  display: grid;
  place-content: center;
  padding: 30px;
  color: var(--muted);
}
.empty span {
  font-size: 32px;
  color: var(--accent);
}
.empty h2 {
  font-size: 17px;
  color: var(--text);
  margin: 9px 0;
}
.empty p {
  margin: 0;
}
.empty a {
  color: var(--accent);
  margin-top: 12px;
  font-size: 14px;
}
.login-screen {
  position: fixed;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--bg);
}
.login-card {
  width: min(100%, 410px);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: 24px;
  padding: 42px;
}
.brand-mark.large {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  font-size: 22px;
  margin-bottom: 32px;
}
.login-card h1 {
  font-size: 30px;
  margin-bottom: 12px;
}
.login-card form {
  display: grid;
  gap: 12px;
  margin-top: 31px;
}
.login-card input {
  height: 48px;
  border-radius: 11px;
  border: 1px solid var(--line);
  padding: 0 14px;
  background: var(--bg);
  color: var(--text);
  font: 14px inherit;
  outline: none;
}
.login-card input:focus {
  border-color: var(--accent);
}
.primary {
  height: 48px;
  border: 0;
  border-radius: 11px;
  background: linear-gradient(135deg, #8894ff, #6572e9);
  color: white;
  font: 700 14px inherit;
  cursor: pointer;
  display: flex;
  justify-content: center;
  gap: 8px;
  align-items: center;
}
.primary:disabled {
  opacity: 0.6;
}
.form-message {
  min-height: 18px;
  margin: 1px 0 0;
  color: #ff8792;
  font-size: 12px;
}
@media (max-width: 900px) {
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 600px) {
  .container {
    padding: 19px 18px 56px;
  }
  .clock {
    display: none;
  }
  .welcome {
    padding: 71px 0 40px;
  }
  .welcome h1 {
    font-size: 34px;
  }
  .cards {
    grid-template-columns: 1fr;
  }
  .navigation {
    gap: 31px;
  }
  .search {
    margin-top: 29px;
  }
  .login-card {
    padding: 32px 25px;
    border-radius: 20px;
  }
}

/* Navigation workspace — compact, search-first layout */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.container {
  max-width: 1460px;
  padding: 18px 32px 72px;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 4;
  height: 68px;
  gap: 24px;
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  backdrop-filter: blur(16px);
}
.web-search {
  height: 42px;
  flex: 1;
  max-width: 680px;
  display: flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.08);
}
.web-search:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.web-search select,
.web-search input,
.web-search button {
  height: 100%;
  border: 0;
  background: transparent;
  color: var(--text);
  font: 13px inherit;
  outline: 0;
}
.web-search select {
  max-width: 125px;
  padding: 0 28px 0 13px;
  border-right: 1px solid var(--line);
  color: var(--muted);
  cursor: pointer;
}
.web-search input {
  min-width: 0;
  flex: 1;
  padding: 0 13px;
}
.web-search input::placeholder { color: var(--muted); }
.web-search button {
  width: 44px;
  font: 27px/1 Georgia, serif;
  color: var(--muted);
  cursor: pointer;
}
.web-search button:hover { color: var(--accent); }
.workspace-layout {
  display: grid;
  grid-template-columns: 124px minmax(0, 1fr);
  gap: 24px;
  margin-top: 22px;
}
.category-rail {
  position: sticky;
  top: 91px;
  align-self: start;
  display: grid;
  gap: 4px;
  max-height: calc(100vh - 110px);
  overflow: auto;
  padding: 8px 0;
}
.category-rail a {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 7px 8px;
  color: var(--muted);
  border-radius: 9px;
  text-decoration: none;
  font-size: 12px;
  transition: 0.16s background, 0.16s color;
}
.category-rail a:hover { color: var(--text); background: var(--accent-soft); }
.category-rail a span {
  width: 22px;
  height: 22px;
  display: grid;
  flex: 0 0 22px;
  place-items: center;
  border-radius: 7px;
  font-size: 11px;
}
.category-rail b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 650;
}
.navigation { gap: 25px; }
.nav-group { scroll-margin-top: 96px; }
.group-heading { margin-bottom: 10px; }
.group-heading h2 { font-size: 15px; }
.group-icon { width: 24px; height: 24px; border-radius: 7px; }
.cards { grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 9px; }
.nav-card {
  min-height: 70px;
  padding: 10px;
  gap: 9px;
  border-radius: 12px;
}
.site-icon { flex-basis: 30px; height: 30px; border-radius: 9px; }
.site-icon img { width: 18px; height: 18px; }
.card-copy { gap: 2px; }
.card-copy strong { font-size: 12px; }
.card-copy small { font-size: 10px; }
.arrow { display: none; }
@media (max-width: 1250px) {
  .cards { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .container { padding-inline: 24px; }
  .topbar { gap: 16px; }
  .brand > span:last-child { display: none; }
  .clock { display: none; }
  .cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 650px) {
  .container { padding: 0 15px 42px; }
  .topbar {
    height: auto;
    min-height: 112px;
    flex-wrap: wrap;
    gap: 9px;
    padding: 10px 0;
  }
  .top-actions { margin-left: auto; }
  .admin-link { height: 32px; padding: 0 10px; }
  .web-search { order: 3; flex-basis: 100%; max-width: none; height: 40px; }
  .web-search select { max-width: 105px; padding-left: 10px; }
  .workspace-layout { display: block; margin-top: 10px; }
  .category-rail {
    position: sticky;
    top: 106px;
    z-index: 3;
    display: flex;
    gap: 7px;
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 9px 0 12px;
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: blur(14px);
  }
  .category-rail a { flex: 0 0 auto; padding: 5px 8px; border: 1px solid var(--line); background: var(--surface); }
  .category-rail a span { width: 19px; height: 19px; flex-basis: 19px; font-size: 10px; }
  .navigation { gap: 21px; }
  .nav-group { scroll-margin-top: 163px; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .nav-card { min-height: 64px; padding: 9px; }
  .card-copy strong { font-size: 12px; }
  .card-copy small { display: none; }
}
