:root {
  --surface-base: #f6efe6;
  --surface-tint: #eadfd0;
  --surface-soft: rgba(255, 252, 247, 0.56);
  --surface-strong: rgba(255, 251, 246, 0.88);
  --surface-panel: rgba(255, 255, 255, 0.72);
  --line: rgba(79, 61, 43, 0.16);
  --line-strong: rgba(36, 26, 16, 0.24);
  --text: #1f1811;
  --text-muted: #6e6256;
  --accent: #1e6d5b;
  --accent-bright: #2f9077;
  --accent-deep: #103a31;
  --accent-soft: rgba(30, 109, 91, 0.14);
  --danger: #ad4d3d;
  --warning: #a87434;
  --shadow-soft: 0 20px 48px rgba(31, 22, 12, 0.12);
  --shadow-card: 0 40px 120px rgba(27, 19, 11, 0.17);
  --shadow-nav: inset 0 1px 0 rgba(255, 255, 255, 0.06), 22px 0 52px rgba(0, 0, 0, 0.12);
  --radius-xs: 12px;
  --radius-sm: 18px;
  --radius-md: 24px;
  --radius-lg: 30px;
  --radius-xl: 38px;
}

* {
  box-sizing: border-box;
}

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

html {
  scroll-behavior: smooth;
}

body {
  position: relative;
  color: var(--text);
  font-family: "Manrope", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 12% 12%, rgba(255, 255, 255, 0.92), transparent 26%),
    radial-gradient(circle at 85% 14%, rgba(39, 128, 104, 0.14), transparent 24%),
    radial-gradient(circle at 72% 78%, rgba(184, 140, 78, 0.14), transparent 18%),
    linear-gradient(160deg, #f8f3eb, #eee3d6 56%, #efe7dd);
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}

body::before {
  background:
    linear-gradient(rgba(255, 255, 255, 0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.16) 1px, transparent 1px);
  background-size: 30px 30px;
  mask-image: radial-gradient(circle at center, black 30%, transparent 92%);
  opacity: 0.22;
}

body::after {
  background:
    radial-gradient(circle at 14% 82%, rgba(16, 58, 49, 0.08), transparent 26%),
    radial-gradient(circle at 88% 70%, rgba(191, 143, 74, 0.12), transparent 22%);
}

a,
button,
input,
select,
textarea {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

input,
textarea,
select {
  width: 100%;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.84);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(30, 109, 91, 0.38);
  box-shadow: 0 0 0 4px rgba(30, 109, 91, 0.1);
  background: rgba(255, 255, 255, 0.94);
}

textarea {
  resize: vertical;
}

code {
  font-family: "Consolas", "Monaco", monospace;
}

.hidden {
  display: none !important;
}

.page-shell {
  position: relative;
  width: min(1580px, calc(100% - 32px));
  margin: 16px auto;
  min-height: calc(100vh - 32px);
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: linear-gradient(180deg, rgba(255, 252, 247, 0.56), rgba(249, 243, 236, 0.8));
  backdrop-filter: blur(24px);
  box-shadow: var(--shadow-card);
}

.page-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), transparent 26%);
  pointer-events: none;
}

.side-nav {
  position: relative;
  z-index: 1;
  padding: 30px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  color: #eef8f3;
  background: linear-gradient(180deg, #123d34 0%, #16453a 45%, #1c5144 100%);
  box-shadow: var(--shadow-nav);
}

.side-nav::before,
.side-nav::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.side-nav::before {
  width: 220px;
  height: 220px;
  top: -96px;
  left: -60px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.16), transparent 70%);
}

.side-nav::after {
  width: 180px;
  height: 180px;
  right: -72px;
  bottom: 72px;
  background: radial-gradient(circle, rgba(210, 176, 120, 0.18), transparent 72%);
}

.brand {
  position: relative;
  display: grid;
  gap: 10px;
  padding: 22px 18px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.brand-title {
  margin: 0;
  color: #f8fbfa;
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 48px;
  line-height: 0.92;
  letter-spacing: -0.04em;
}

.brand-subtitle {
  color: rgba(232, 246, 240, 0.78);
  font-size: 14px;
  line-height: 1.7;
}

.nav-button,
.nav-link,
.pill,
.btn,
.link-btn {
  position: relative;
  min-height: 48px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 20px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease, opacity 0.18s ease;
}

.nav-button:hover,
.nav-link:hover,
.btn:hover:not(:disabled),
.link-btn:hover,
.pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(24, 17, 10, 0.08);
}

.btn:disabled,
.nav-button:disabled,
.nav-link:disabled {
  cursor: not-allowed;
  opacity: 0.56;
  box-shadow: none;
  transform: none;
}

.btn-primary,
.nav-button.primary {
  color: #f8fffd;
  border-color: rgba(36, 121, 100, 0.44);
  background: linear-gradient(135deg, var(--accent-bright), var(--accent-deep));
  box-shadow: 0 16px 32px rgba(15, 58, 49, 0.26);
}

.btn-secondary,
.link-btn,
.pill {
  color: var(--text);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.72);
}

.btn-danger {
  color: #fff;
  border-color: rgba(173, 77, 61, 0.52);
  background: linear-gradient(135deg, #c86452, var(--danger));
  box-shadow: 0 14px 30px rgba(173, 77, 61, 0.2);
}

.nav-list {
  display: grid;
  gap: 10px;
}

.nav-link {
  min-height: 62px;
  padding: 0 18px;
  justify-content: flex-start;
  border-radius: 22px;
  font-size: 18px;
  font-weight: 600;
  color: rgba(236, 247, 242, 0.84);
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: none;
}

.nav-link.active {
  color: #0f2f28;
  border-color: rgba(255, 255, 255, 0.24);
  background: linear-gradient(135deg, #f5efe6, #d8ece5);
  box-shadow: 0 16px 30px rgba(8, 28, 24, 0.18);
}

.nav-foot {
  margin-top: auto;
  padding-top: 18px;
  display: grid;
  gap: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-foot .nav-link,
.nav-foot .nav-button {
  min-height: 54px;
}

.main-pane {
  position: relative;
  z-index: 1;
  min-width: 0;
  min-height: 100%;
  padding: 28px;
  display: grid;
  gap: 18px;
  align-content: start;
}

.main-pane > * {
  min-width: 0;
}

.glass-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.76);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(252, 248, 242, 0.78));
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-soft);
}

.glass-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.72);
  pointer-events: none;
}

.section-title {
  margin: 0;
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.06;
  letter-spacing: -0.02em;
}

.section-desc {
  margin: 10px 0 0;
  color: var(--text-muted);
  line-height: 1.8;
  font-size: 14px;
}

.banner {
  display: none;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.76);
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.7;
  white-space: pre-wrap;
}

.banner.show {
  display: block;
}

.banner.success {
  color: #205a48;
  border-color: rgba(30, 109, 91, 0.28);
  background: rgba(30, 109, 91, 0.12);
}

.banner.error {
  color: #8e3529;
  border-color: rgba(173, 77, 61, 0.26);
  background: rgba(173, 77, 61, 0.1);
}

.banner.info {
  color: #506057;
  border-color: rgba(73, 77, 75, 0.18);
  background: rgba(73, 77, 75, 0.08);
}

.banner-title {
  display: block;
  margin-bottom: 4px;
  font-weight: 700;
}

.mobile-topbar,
.mobile-nav {
  display: none;
}

@media (max-width: 1180px) {
  .page-shell {
    width: min(100%, calc(100% - 24px));
    grid-template-columns: 286px minmax(0, 1fr);
  }

  .main-pane {
    padding: 22px;
  }
}

@media (max-width: 1100px) {
  .page-shell {
    width: 100%;
    margin: 0;
    min-height: 100vh;
    border: 0;
    border-radius: 0;
    grid-template-columns: 1fr;
  }

  .side-nav {
    display: none;
  }

  .main-pane {
    padding: 84px 14px 96px;
  }

  .mobile-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    height: 64px;
    padding: 0 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(248, 242, 234, 0.88);
    border-bottom: 1px solid rgba(255, 255, 255, 0.86);
    backdrop-filter: blur(18px);
  }

  .mobile-brand {
    color: var(--accent-deep);
    font-family: "Noto Serif SC", "Songti SC", serif;
    font-size: 30px;
    line-height: 1;
  }

  .mobile-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    padding: 10px 12px 14px;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    gap: 8px;
    background: rgba(248, 242, 234, 0.92);
    border-top: 1px solid rgba(255, 255, 255, 0.84);
    backdrop-filter: blur(18px);
  }

  .mobile-nav a,
  .mobile-nav button {
    min-height: 50px;
    padding: 0 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.82);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.78);
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 600;
  }

  .mobile-nav .active {
    color: var(--accent-deep);
    background: linear-gradient(135deg, rgba(217, 239, 232, 0.96), rgba(248, 244, 237, 0.9));
    border-color: rgba(30, 109, 91, 0.18);
  }
}
