:root {
  --bg: #eef5ff;
  --bg-soft: #f7fbff;
  --panel: rgba(255, 255, 255, 0.9);
  --panel-strong: #ffffff;
  --text: #10325d;
  --text-soft: #5f7da0;
  --primary: #2d6cdf;
  --primary-strong: #184da9;
  --border: rgba(72, 127, 201, 0.16);
  --shadow: 0 24px 60px rgba(23, 67, 128, 0.12);
  --shadow-soft: 0 12px 28px rgba(45, 108, 223, 0.08);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 18px;
  --radius-sm: 14px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(120, 182, 255, 0.36), transparent 28%),
    radial-gradient(circle at top right, rgba(145, 211, 255, 0.3), transparent 24%),
    linear-gradient(180deg, #f8fbff 0%, #edf5ff 58%, #e9f1fb 100%);
}

button {
  font: inherit;
}

.shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 28px 20px;
  border-right: 1px solid rgba(109, 157, 224, 0.18);
  background: linear-gradient(180deg, rgba(245, 250, 255, 0.96), rgba(234, 242, 255, 0.96));
  backdrop-filter: blur(18px);
}

.brand-block {
  display: grid;
  gap: 6px;
  margin-bottom: 32px;
}

.brand-block > div {
  min-width: 0;
}

.brand-topline {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  flex: 0 0 50px;
}

.brand-mark img {
  display: block;
  width: 50px;
  height: auto;
  object-fit: contain;
}

.eyebrow,
.section-eyebrow,
.sidebar-card-label {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.brand-block h1,
.sidebar-card-title,
.frame-title {
  margin: 0;
}

.brand-block h1 {
  font-size: 28px;
  line-height: 1.04;
  letter-spacing: -0.03em;
  font-weight: 800;
  white-space: nowrap;
  color: #295da8;
}

.brand-block .eyebrow {
  color: #6a8fc4;
  white-space: nowrap;
}

.nav-tree {
  display: grid;
  gap: 8px;
}

.nav-group {
  display: grid;
  gap: 8px;
}

.nav-item,
.subnav-item,
.subnav-section-button {
  width: 100%;
  text-align: left;
  border: 0;
  cursor: pointer;
  border-radius: 16px;
  color: var(--text);
  background: transparent;
}

.nav-item {
  padding: 14px 16px;
  font-weight: 700;
}

.subnav {
  display: grid;
  gap: 10px;
  margin-top: 8px;
  padding-left: 10px;
}

.subnav-section {
  display: grid;
  gap: 8px;
  margin-top: 4px;
}

.subnav-section-title {
  padding: 2px 14px 0 18px;
  color: #7487a4;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.subnav-section-button {
  padding: 12px 14px;
  background: transparent;
  color: var(--text-soft);
}

.subnav-nested {
  position: relative;
  display: grid;
  gap: 4px;
  margin-left: 16px;
  padding-left: 14px;
}

.subnav-nested::before {
  content: "";
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 0;
  width: 1px;
  background: linear-gradient(180deg, rgba(122, 140, 165, 0.1), rgba(122, 140, 165, 0.42), rgba(122, 140, 165, 0.1));
}

.subnav[hidden] {
  display: none;
}

.subnav-item {
  padding: 12px 14px;
  color: var(--text-soft);
}

.subnav-nested .subnav-item {
  position: relative;
  padding: 10px 14px 10px 18px;
  border-radius: 12px;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.18);
}

.subnav-nested .subnav-item::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -14px;
  width: 10px;
  height: 1px;
  background: rgba(122, 140, 165, 0.5);
  transform: translateY(-50%);
}

.nav-item.active,
.nav-item:hover,
.subnav-item.active,
.subnav-item:hover,
.subnav-section-button.active,
.subnav-section-button:hover {
  background: linear-gradient(135deg, rgba(45, 108, 223, 0.12), rgba(120, 182, 255, 0.22));
}

.subnav-item.active,
.subnav-section-button.active {
  color: var(--primary-strong);
  font-weight: 700;
}

.subnav-nested .subnav-item.active,
.subnav-nested .subnav-item:hover {
  background: linear-gradient(135deg, rgba(45, 108, 223, 0.08), rgba(120, 182, 255, 0.14));
}

.subnav-nested .subnav-item.active::before {
  background: rgba(45, 108, 223, 0.78);
  height: 2px;
}

.sidebar-card {
  margin-top: 28px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.7);
  box-shadow: var(--shadow-soft);
}

.sidebar-card-text {
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-soft);
}

.content {
  padding: 22px;
  min-width: 0;
}

.frame-shell {
  min-height: calc(100vh - 44px);
}

.frame-panel {
  min-height: calc(100vh - 44px);
  overflow: clip;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.dashboard-host {
  width: 100%;
  min-height: calc(100vh - 44px);
  min-width: 0;
  background: transparent;
}

.module-page {
  display: grid;
  gap: 22px;
  padding: 28px;
}

.module-stat-grid,
.module-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.module-data-list {
  display: grid;
  gap: 12px;
}

.module-data-item {
  display: grid;
  gap: 10px;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(88, 140, 214, 0.15);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(237, 245, 255, 0.88));
}

.module-data-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.module-data-meta {
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.6;
}

.module-status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(236, 244, 255, 0.94);
  color: var(--primary-strong);
  font-size: 12px;
  font-weight: 700;
}

.module-progress-track {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(222, 233, 247, 0.9), rgba(212, 226, 245, 0.96));
  overflow: hidden;
}

.module-progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(120, 182, 255, 0.92), rgba(45, 108, 223, 0.9));
}

@media (max-width: 980px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid rgba(109, 157, 224, 0.18);
  }

  .content {
    padding: 18px;
  }

  .module-page {
    padding: 20px;
  }

  .module-stat-grid,
  .module-card-grid {
    grid-template-columns: 1fr;
  }
}
