:root {
  /* Align with Aurora home + cart palette */
  --nova-bg: #f3f7ff;
  --nova-surface: #ffffff;
  --nova-ink: #071b45;
  --nova-muted: #66758e;
  --nova-line: #d5e1f7;
  --nova-accent: #2f6bff;
  --nova-accent-2: #194fd3;
  --nova-accent-soft: #e9f1ff;
  --nova-sky: #78c8ff;
  --nova-sidebar: #ffffff;
  --nova-sidebar-text: #1a1a1a;
  --nova-warn: #f6a723;
  --nova-danger: #ef4f5f;
  --nova-ok: #1fa878;
  --nova-radius: 14px;
  --nova-shadow: 0 18px 52px rgba(25, 79, 174, 0.1);
  --nova-grad-btn: linear-gradient(135deg, var(--nova-accent), var(--nova-accent-2));
  --txtcolor: var(--nova-ink);
  --font-display: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  --font-body: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body.nova-body {
  font-family: var(--font-body);
  color: var(--nova-ink);
  background:
    radial-gradient(circle at 8% 2%, rgba(120, 200, 255, 0.14), transparent 30rem),
    linear-gradient(180deg, #eef5ff 0, var(--nova-bg) 240px, #f8faff 100%);
  min-height: 100vh;
}

a { color: var(--nova-accent); text-decoration: none; }
a:hover { color: var(--nova-accent-2); }

.nova-shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}

.nova-shell.is-folded {
  grid-template-columns: 72px 1fr;
}

.nova-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background: var(--nova-sidebar);
  color: var(--nova-sidebar-text);
  padding: 18px 12px 64px;
  overflow: auto;
  z-index: 40;
  border-right: 1px solid var(--nova-line);
  box-shadow: 1px 0 0 rgba(7, 27, 69, 0.03);
}

.nova-sidebar-logo {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin: 0 0 18px;
  padding: 4px 8px 14px;
  border-bottom: 1px solid var(--nova-line);
}

.nova-sidebar-logo a {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  color: var(--nova-sidebar-text);
}

.nova-sidebar-logo img {
  display: block;
  max-width: 160px;
  max-height: 42px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.nova-sidebar-logo-text {
  font-size: 16px;
  font-weight: 700;
  color: var(--nova-sidebar-text);
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nova-shell.is-folded .nova-sidebar-logo {
  justify-content: center;
  padding-left: 0;
  padding-right: 0;
}

.nova-shell.is-folded .nova-sidebar-logo img {
  max-width: 36px;
  max-height: 36px;
}

.nova-shell.is-folded .nova-sidebar-logo-text {
  display: none;
}

.nova-shell.is-folded .nova-sidebar {
  overflow: hidden;
  padding-left: 8px;
  padding-right: 8px;
}

.nova-shell.is-folded .nova-nav-link {
  justify-content: center;
  padding: 12px 8px;
  gap: 0;
  overflow: hidden;
  white-space: nowrap;
}

.nova-shell.is-folded .nova-nav-link > span {
  display: none !important;
}

.nova-shell.is-folded .nova-subnav {
  display: none !important;
}

.nova-shell.is-folded .nova-nav-icon {
  width: 22px;
  min-width: 22px;
  font-size: 20px;
  margin: 0;
}

.nova-shell.is-folded .nova-sidebar-fold {
  left: 50%;
  transform: translateX(-50%);
}

.nova-sidebar-fold {
  position: absolute;
  left: 12px;
  bottom: 16px;
  width: 36px;
  height: 36px;
  border: 1px solid var(--nova-line);
  border-radius: 10px;
  background: #f5f7fb;
  cursor: pointer;
}

.nova-sidebar-fold span {
  display: block;
  width: 14px;
  height: 2px;
  margin: 0 auto;
  background: var(--nova-sidebar-text);
  box-shadow: 0 -5px 0 var(--nova-sidebar-text), 0 5px 0 var(--nova-sidebar-text);
}

.nova-nav-list,
.nova-subnav {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nova-nav-link {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--nova-sidebar-text);
  font-size: 16px;
  text-align: left;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}

.nova-nav-link > span {
  text-align: left;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nova-nav-link:hover,
.nova-nav-link.is-active,
.nova-nav-link.active {
  background: var(--nova-accent-soft);
  color: var(--nova-accent-2);
}

.nova-nav-icon {
  width: 20px;
  min-width: 20px;
  font-size: 18px;
  line-height: 1;
  text-align: center;
  opacity: .95;
}

.nova-subnav {
  display: none;
  padding-left: 12px;
  margin: 4px 0 8px;
}

.nova-subnav.is-open { display: block; }

.nova-workspace {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.nova-topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 10px 20px;
  background: rgba(255,255,255,0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--nova-line);
  position: sticky;
  top: 0;
  z-index: 30;
}

.nova-shell.has-top-tint .nova-topbar {
  background: linear-gradient(90deg, rgba(47, 107, 255, 0.08), rgba(255, 255, 255, 0.92));
}

.nova-brand img { display: block; }

.nova-topbar-left { margin-right: auto; }
.nova-topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nova-icon-btn,
.nova-lang-btn {
  border: 0;
  background: transparent;
  color: var(--nova-ink);
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
  font: inherit;
  position: relative;
}

.nova-icon-btn:hover,
.nova-lang-btn:hover {
  background: rgba(47, 107, 255, 0.08);
}

.nova-icon-btn em {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--nova-danger);
  color: #fff;
  font-size: 11px;
  line-height: 16px;
  text-align: center;
  font-style: normal;
}

.nova-lang,
.nova-dropdown,
.nova-user {
  position: relative;
}

.nova-lang-menu,
.nova-dropdown-panel {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 180px;
  background: var(--nova-surface);
  border: 1px solid var(--nova-line);
  border-radius: 12px;
  box-shadow: var(--nova-shadow);
  padding: 8px;
  z-index: 50;
}

.nova-lang-menu.is-open,
.nova-dropdown-panel.is-open {
  display: block;
}

.nova-lang-item,
.nova-dropdown-panel a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--nova-ink);
}

.nova-lang-item:hover,
.nova-dropdown-panel a:hover {
  background: rgba(47, 107, 255, 0.08);
}

.nova-balance {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px;
  border-bottom: 1px solid var(--nova-line);
  margin-bottom: 8px;
}

.nova-balance strong {
  display: block;
  font-size: 22px;
  margin-top: 4px;
}

.nova-quick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.nova-user {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 6px 4px 10px;
  border-radius: 999px;
  background: rgba(47, 107, 255, 0.08);
  cursor: pointer;
}

.nova-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--nova-accent);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  overflow: hidden;
}

.nova-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nova-pagehead {
  padding: 18px 20px 0;
}

.nova-pagehead h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.nova-main {
  padding: 16px 20px 28px;
  flex: 1;
}

.nova-content { min-width: 0; }

.nova-footer {
  padding: 12px 20px 24px;
  color: var(--nova-muted);
  font-size: 13px;
}
.nova-footer.left { text-align: left; }
.nova-footer.center { text-align: center; }
.nova-footer.right { text-align: right; }

.nova-grid {
  display: grid;
  gap: 16px;
}

.nova-grid.cols-2 { grid-template-columns: 1.2fr 0.8fr; }
.nova-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.nova-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }

.nova-card {
  background: var(--nova-surface);
  border: 1px solid var(--nova-line);
  border-radius: var(--nova-radius);
  box-shadow: var(--nova-shadow);
  padding: 18px;
  animation: novaRise .45s ease both;
}

.nova-card h2,
.nova-card .nova-card-title {
  margin: 0 0 14px;
  font-size: 16px;
  font-weight: 700;
}

.nova-stat {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nova-stat .num {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.nova-stat .meta {
  color: var(--nova-muted);
  font-size: 13px;
}

.nova-user-row {
  display: flex;
  gap: 16px;
  align-items: center;
}

.nova-user-row .big-avatar {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--nova-accent), var(--nova-accent-2));
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 24px;
  font-weight: 700;
  overflow: hidden;
  flex-shrink: 0;
}

.nova-user-meta {
  display: grid;
  gap: 6px;
  color: var(--nova-muted);
}

.nova-user-meta strong { color: var(--nova-ink); }

.nova-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.nova-actions .btn,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 10px;
  padding: 8px 14px;
  border: 1px solid transparent;
  cursor: pointer;
  font: inherit;
}

.btn-primary {
  background: var(--nova-grad-btn);
  border-color: transparent;
  color: #fff;
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--nova-accent-2), #123ea8);
  color: #fff;
}

.btn-outline-primary {
  background: transparent;
  border-color: rgba(47, 107, 255, 0.35);
  color: var(--nova-accent);
}
.btn-outline-primary:hover {
  background: var(--nova-accent-soft);
}

.nova-alert {
  border-radius: 12px;
  padding: 12px 14px;
  background: #fff7e8;
  border: 1px solid #f0d7a4;
  color: #7a5410;
  margin-bottom: 16px;
}

.nova-tip-card {
  border-left: 4px solid var(--nova-accent, #2f6bff);
}

.nova-tip-body {
  color: var(--nova-ink, #1a2333);
  line-height: 1.75;
  font-size: 14px;
}

.nova-tip-body p {
  margin: 0 0 10px;
}

.nova-tip-body p:last-child {
  margin-bottom: 0;
}

.nova-tip-subtitle {
  font-weight: 700;
  margin-top: 4px !important;
}

.nova-tip-steps {
  margin: 0 0 12px;
  padding-left: 1.35em;
}

.nova-tip-steps li {
  margin-bottom: 6px;
}

.nova-tip-steps li:last-child {
  margin-bottom: 0;
}

.nova-card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.nova-more-link {
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.nova-notice-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nova-notice-list li {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--nova-line);
}

.nova-notice-list li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.nova-notice-list li:first-child {
  padding-top: 0;
}

.nova-notice-list a {
  flex: 1;
  min-width: 0;
  color: var(--nova-ink, #1a2333);
  line-height: 1.5;
}

.nova-notice-list a:hover {
  color: var(--nova-accent, #2f6bff);
}

.nova-notice-list time {
  flex-shrink: 0;
  color: var(--nova-muted);
  font-size: 12px;
  line-height: 1.5;
}

.nova-product-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}

.nova-product-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--nova-line);
  color: var(--nova-ink);
  transition: transform .2s ease, border-color .2s ease;
}

.nova-product-list a:hover {
  transform: translateY(-2px);
  border-color: rgba(47, 107, 255, 0.45);
  background: var(--nova-accent-soft);
}

.nova-empty {
  color: var(--nova-muted);
  padding: 20px 0;
}

@keyframes novaRise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.nova-menu-toggle {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 10px;
  background: rgba(47, 107, 255, 0.1);
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 10px;
  cursor: pointer;
}
.nova-menu-toggle i {
  display: block;
  height: 2px;
  background: var(--nova-ink);
}

.hide-xs { display: initial; }
.hide-pc { display: none; }

@media (max-width: 1100px) {
  .nova-grid.cols-2,
  .nova-grid.cols-3,
  .nova-grid.cols-4 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .hide-xs { display: none !important; }
  .hide-pc { display: inline-flex !important; }

  .nova-shell,
  .nova-shell.is-folded {
    grid-template-columns: 1fr;
  }

  .nova-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    transform: translateX(-105%);
    transition: transform .25s ease;
    width: 260px;
  }

  .nova-shell.is-drawer-open .nova-sidebar {
    transform: none;
  }

  .nova-menu-toggle { display: inline-flex; }
}

/* Compat aliases used by inherited default pages */
.sky-card,
.bgw {
  background: var(--nova-surface);
  border: 1px solid var(--nova-line);
  border-radius: var(--nova-radius);
  box-shadow: var(--nova-shadow);
  padding: 18px;
  margin-bottom: 16px;
}
.sky-title { font-size: 16px; font-weight: 700; margin: 0 0 14px; }
.sky-row { display: flex; flex-wrap: wrap; gap: 12px; }
.sky-column { display: flex; flex-direction: column; gap: 8px; }
.sky-flex-100 { width: 100%; }
.sky-flex-70 { flex: 1 1 66%; }
.sky-flex-66 { flex: 1 1 66%; }
.sky-flex-30 { flex: 1 1 30%; }
.text-success { color: var(--nova-ok); }
.text-danger { color: var(--nova-danger); }
.text-warning { color: var(--nova-warn); }
.text-primary { color: var(--nova-accent); }

/* Hide broken topbar logo + language flag images */
.nova-brand,
.nova-brand img,
.nova-lang-btn > img,
.nova-lang-item > img {
  display: none !important;
}
