:root {
  --bg: #f2f6f3;
  --surface: #ffffff;
  --surface-2: #f8fbf9;
  --ink: #13251f;
  --ink-2: #344a42;
  --muted: #6d7f78;
  --muted-2: #93a39c;
  --line: #e2ebe6;
  --line-strong: #d3e0da;
  --brand: #0d7c66;
  --brand-strong: #0a5f4e;
  --brand-soft: #e6f4ef;
  --brand-deep: #0b312b;
  --gold: #e9c46a;
  --gold-soft: #fdf5df;
  --blue: #2563a8;
  --blue-soft: #eaf2fc;
  --violet: #6d49b8;
  --violet-soft: #f2edfd;
  --amber: #a56412;
  --amber-soft: #fdf3e1;
  --red: #b42318;
  --red-soft: #fdecea;
  --orange: #b45309;
  --orange-soft: #fff0e2;
  --green: #0b7355;
  --green-soft: #e4f6ee;
  --gray-soft: #eef2f0;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 14px 40px rgba(14, 56, 45, 0.07);
  --shadow-sm: 0 4px 16px rgba(14, 56, 45, 0.05);
  --font: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Noto Sans CJK SC",
    "Segoe UI", system-ui, -apple-system, sans-serif;
  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(900px 420px at 88% -8%, rgba(13, 124, 102, 0.09), transparent 65%),
    radial-gradient(700px 380px at 4% 100%, rgba(233, 196, 106, 0.08), transparent 70%);
  pointer-events: none;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

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

button {
  cursor: pointer;
}

a {
  color: var(--brand);
  text-decoration: none;
}

svg {
  display: block;
}

.icon {
  width: 18px;
  height: 18px;
  flex: none;
}

.icon--sm {
  width: 15px;
  height: 15px;
}

.icon--lg {
  width: 22px;
  height: 22px;
}

.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;
}

/* ---------- 启动 ---------- */
.boot-screen {
  min-height: 100vh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  color: var(--muted);
  font-size: 13px;
}

.boot-mark {
  width: 54px;
  height: 54px;
  animation: float 2.4s ease-in-out infinite;
}

.boot-mark svg {
  width: 100%;
  height: 100%;
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(11, 49, 43, 0.25);
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

/* ---------- 通用控件 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--ink-2);
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  transition:
    transform 0.16s var(--ease),
    box-shadow 0.16s var(--ease),
    background 0.16s var(--ease),
    border-color 0.16s var(--ease);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn:focus-visible,
.icon-btn:focus-visible,
.nav-item:focus-visible,
.tab:focus-visible {
  outline: 3px solid rgba(13, 124, 102, 0.28);
  outline-offset: 2px;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.btn--primary {
  background: linear-gradient(135deg, #0e826a, #0a5f4e);
  color: #fff;
  box-shadow: 0 8px 20px rgba(13, 124, 102, 0.24);
}

.btn--primary:hover {
  box-shadow: 0 12px 24px rgba(13, 124, 102, 0.3);
}

.btn--gold {
  background: linear-gradient(135deg, #f0d17e, #e3b64f);
  color: #3a2b07;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.btn--secondary {
  background: var(--surface);
  border-color: var(--line-strong);
  color: var(--ink-2);
}

.btn--secondary:hover {
  border-color: #b9ccc3;
  background: #fbfdfc;
}

.btn--ghost {
  color: var(--muted);
}

.btn--ghost:hover {
  background: var(--surface-2);
  color: var(--ink);
}

.btn--danger {
  background: var(--red-soft);
  color: var(--red);
  border-color: #f6cfca;
}

.btn--danger:hover {
  background: #fce3df;
}

.btn--sm {
  height: 32px;
  padding: 0 11px;
  font-size: 13px;
  border-radius: 8px;
}

.btn--block {
  width: 100%;
}

.btn .spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.btn--secondary .spinner,
.btn--ghost .spinner {
  border-color: rgba(13, 124, 102, 0.2);
  border-top-color: var(--brand);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--muted);
  transition:
    background 0.16s var(--ease),
    color 0.16s var(--ease),
    border-color 0.16s var(--ease);
}

.icon-btn:hover {
  background: var(--brand-soft);
  color: var(--brand-strong);
  border-color: #cfe7de;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px 0;
}

.card-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.card-sub {
  margin-top: 3px;
  font-size: 12.5px;
  color: var(--muted);
}

.card-body {
  padding: 18px 22px 22px;
}

.link-more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--brand);
  background: none;
  border: 0;
  padding: 4px;
}

.link-more:hover {
  color: var(--brand-strong);
}

/* ---------- 徽标 ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
}

.badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}

.badge--plain::before {
  display: none;
}

.badge--amber {
  background: var(--amber-soft);
  color: var(--amber);
}

.badge--blue {
  background: var(--blue-soft);
  color: var(--blue);
}

.badge--violet {
  background: var(--violet-soft);
  color: var(--violet);
}

.badge--green {
  background: var(--green-soft);
  color: var(--green);
}

.badge--orange {
  background: var(--orange-soft);
  color: var(--orange);
}

.badge--red {
  background: var(--red-soft);
  color: var(--red);
}

.badge--gray {
  background: var(--gray-soft);
  color: #5f7069;
}

.badge--gold {
  background: rgba(233, 196, 106, 0.16);
  color: #f4d789;
}

/* ---------- 登录 / 初始化 ---------- */
.auth {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(420px, 0.94fr);
}

.auth-brand {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 48px 56px;
  background:
    radial-gradient(700px 420px at 20% 0%, rgba(42, 157, 143, 0.35), transparent 65%),
    linear-gradient(155deg, #0d3b33 0%, #07241f 100%);
  color: #fff;
}

.auth-brand::before,
.auth-brand::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.09);
}

.auth-brand::before {
  width: 520px;
  height: 520px;
  right: -180px;
  top: -160px;
}

.auth-brand::after {
  width: 360px;
  height: 360px;
  right: -40px;
  top: -40px;
}

.auth-brand-inner {
  position: relative;
  z-index: 1;
  max-width: 520px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  flex: none;
}

.brand-mark svg {
  width: 34px;
  height: 34px;
  border-radius: 9px;
}

.brand-name {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand-sub {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
  margin-top: 1px;
}

.auth-brand h1 {
  margin-top: 64px;
  font-size: clamp(30px, 3.2vw, 44px);
  line-height: 1.24;
  letter-spacing: 0.015em;
  font-weight: 700;
}

.auth-brand h1 em {
  font-style: normal;
  color: var(--gold);
}

.auth-brand .lead {
  margin-top: 18px;
  max-width: 440px;
  font-size: 15px;
  line-height: 1.85;
  color: rgba(255, 255, 255, 0.68);
}

.auth-points {
  margin-top: 40px;
  display: grid;
  gap: 16px;
}

.auth-point {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.auth-point-icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: rgba(233, 196, 106, 0.13);
  color: var(--gold);
  flex: none;
  margin-top: 1px;
}

.auth-point strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
}

.auth-point span {
  display: block;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.55);
  margin-top: 2px;
}

.auth-brand-foot {
  position: relative;
  z-index: 1;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
  display: flex;
  gap: 12px;
  align-items: center;
}

.auth-brand-foot .dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
}

.auth-main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 32px;
  background:
    radial-gradient(600px 300px at 100% 0%, rgba(13, 124, 102, 0.05), transparent 70%),
    #f6f9f7;
}

.auth-card {
  width: 100%;
  max-width: 400px;
}

.auth-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: 12px;
  font-weight: 600;
}

.auth-card h2 {
  margin-top: 16px;
  font-size: 27px;
  letter-spacing: 0.01em;
}

.auth-card .auth-desc {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.7;
}

.auth-form {
  margin-top: 30px;
  display: grid;
  gap: 16px;
}

.auth-form .btn {
  height: 46px;
  margin-top: 4px;
  font-size: 15px;
}

.auth-note {
  margin-top: 20px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.7;
}

.auth-switch {
  margin-top: 22px;
  font-size: 12.5px;
  color: var(--muted);
  text-align: center;
}

.auth-switch button {
  border: 0;
  background: none;
  color: var(--brand);
  font-weight: 600;
  padding: 0 2px;
}

.auth-footer {
  margin-top: 32px;
  font-size: 11.5px;
  color: var(--muted-2);
  text-align: center;
  line-height: 1.8;
}

/* ---------- 应用骨架 ---------- */
.shell {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  z-index: 40;
  inset: 0 auto 0 0;
  width: 252px;
  display: flex;
  flex-direction: column;
  padding: 22px 16px 16px;
  background:
    radial-gradient(420px 260px at 20% 0%, rgba(42, 157, 143, 0.2), transparent 70%),
    linear-gradient(180deg, #0c3a32 0%, #082821 100%);
  color: rgba(255, 255, 255, 0.8);
}

.sidebar .brand-lockup {
  padding: 0 8px 4px;
}

.sidebar .brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: none;
}

.sidebar .brand-mark svg {
  width: 32px;
  height: 32px;
}

.sidebar .brand-name {
  font-size: 15px;
  color: #fff;
}

.sidebar .brand-sub {
  color: rgba(255, 255, 255, 0.42);
}

.nav {
  flex: 1;
  margin-top: 26px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.nav-group + .nav-group {
  margin-top: 22px;
}

.nav-label {
  padding: 0 12px;
  margin-bottom: 7px;
  font-size: 10.5px;
  letter-spacing: 0.14em;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.32);
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 10px 12px;
  margin: 2px 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: rgba(255, 255, 255, 0.66);
  font-size: 13.5px;
  font-weight: 500;
  text-align: left;
  transition:
    background 0.16s var(--ease),
    color 0.16s var(--ease);
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.nav-item.is-active {
  background: rgba(233, 196, 106, 0.12);
  color: #f7e6b8;
  font-weight: 600;
}

.nav-item.is-active::before {
  content: "";
  position: absolute;
  left: -16px;
  top: 9px;
  bottom: 9px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--gold);
}

.nav-item .icon {
  opacity: 0.9;
}

.nav-badge {
  margin-left: auto;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--gold);
  color: #3a2b07;
  font-size: 11px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.sidebar-foot {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.side-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #2a9d8f, #146454);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  flex: none;
  letter-spacing: 0.02em;
}

.avatar--lg {
  width: 46px;
  height: 46px;
  font-size: 17px;
}

.side-user-name {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.side-user-role {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.42);
  line-height: 1.4;
}

.side-logout {
  margin-left: auto;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: rgba(255, 255, 255, 0.45);
  display: grid;
  place-items: center;
}

.side-logout:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.side-version {
  padding: 10px 12px 0;
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.24);
}

.main {
  margin-left: 252px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 72px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 32px;
  background: rgba(246, 249, 247, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(226, 235, 230, 0.7);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  font-size: 12.5px;
  color: var(--muted);
}

.breadcrumb-root {
  color: var(--muted-2);
  white-space: nowrap;
}

.breadcrumb-sep {
  color: var(--line-strong);
}

.breadcrumb-current {
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-date {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 12px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 4px 10px 4px 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  transition: border-color 0.16s var(--ease);
}

.user-chip:hover {
  border-color: var(--line-strong);
}

.user-chip .avatar {
  width: 30px;
  height: 30px;
  font-size: 12px;
}

.user-chip-name {
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.3;
}

.user-chip-role {
  font-size: 10.5px;
  color: var(--muted);
  line-height: 1.3;
}

.menu-btn {
  display: none;
}

.content {
  width: 100%;
  max-width: 1220px;
  margin: 0 auto;
  padding: 30px 32px 70px;
  flex: 1;
}

.view {
  animation: fade-up 0.32s var(--ease);
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.page-head h1 {
  font-size: 25px;
  font-weight: 700;
  letter-spacing: 0.005em;
}

.page-head p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.page-head-actions {
  display: flex;
  gap: 9px;
  align-items: center;
  flex-wrap: wrap;
}

.mobile-nav {
  display: none;
}

/* ---------- 工作台 ---------- */
.hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 24px;
  padding: 32px 34px;
  border-radius: 24px;
  background:
    radial-gradient(600px 300px at 86% 10%, rgba(42, 157, 143, 0.35), transparent 65%),
    linear-gradient(135deg, #0d3b33 0%, #092a24 72%);
  color: #fff;
  box-shadow: 0 26px 60px rgba(9, 42, 36, 0.2);
}

.hero::after {
  content: "";
  position: absolute;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.07);
  right: 80px;
  top: -190px;
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 620px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: currentColor;
  opacity: 0.65;
}

.hero h1 {
  margin-top: 13px;
  font-size: clamp(25px, 2.6vw, 32px);
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.hero p {
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.64);
  font-size: 13.5px;
  line-height: 1.8;
  max-width: 520px;
}

.hero-actions {
  margin-top: 22px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.hero-actions .btn--secondary {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.hero-actions .btn--secondary:hover {
  background: rgba(255, 255, 255, 0.14);
}

.hero-art {
  position: relative;
  z-index: 1;
  width: 220px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-ring {
  position: relative;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.13);
  display: grid;
  place-items: center;
}

.hero-ring::before {
  content: "";
  position: absolute;
  inset: 18px;
  border-radius: 50%;
  border: 1px dashed rgba(233, 196, 106, 0.32);
  animation: spin 26s linear infinite;
}

.hero-ring-inner {
  width: 76px;
  height: 76px;
  border-radius: 24px;
  background: rgba(233, 196, 106, 0.14);
  border: 1px solid rgba(233, 196, 106, 0.28);
  display: grid;
  place-items: center;
  color: var(--gold);
}

.hero-ring-inner .icon {
  width: 34px;
  height: 34px;
}

.hero-art-badge {
  position: absolute;
  right: -4px;
  bottom: 6px;
  padding: 8px 12px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(6px);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  gap: 7px;
}

.hero-art-badge strong {
  color: #fff;
  font-size: 12px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.stat {
  padding: 18px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition:
    transform 0.18s var(--ease),
    box-shadow 0.18s var(--ease);
}

.stat:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.stat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stat-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: grid;
  place-items: center;
}

.stat-icon--green {
  background: var(--green-soft);
  color: var(--green);
}

.stat-icon--amber {
  background: var(--amber-soft);
  color: var(--amber);
}

.stat-icon--blue {
  background: var(--blue-soft);
  color: var(--blue);
}

.stat-icon--violet {
  background: var(--violet-soft);
  color: var(--violet);
}

.stat-icon--gold {
  background: var(--gold-soft);
  color: #9a6c11;
}

.stat-label {
  font-size: 12.5px;
  color: var(--muted);
}

.stat-value {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}

.stat-value small {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  margin-left: 3px;
}

.stat-sub {
  font-size: 11.5px;
  color: var(--muted-2);
  margin-top: -6px;
}

.dash-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(300px, 1fr);
  gap: 18px;
  margin-top: 18px;
}

.pending-list {
  display: grid;
  gap: 8px;
}

.pending-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 14px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: var(--surface-2);
  transition:
    background 0.16s var(--ease),
    border-color 0.16s var(--ease);
}

.pending-item:hover {
  background: #f2f8f5;
  border-color: var(--line);
}

.date-tile {
  width: 52px;
  height: 56px;
  flex: none;
  border-radius: 10px;
  background: var(--amber-soft);
  color: var(--amber);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.1;
}

.date-tile strong {
  font-size: 19px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.date-tile span {
  font-size: 10px;
  opacity: 0.8;
  margin-top: 3px;
}

.pending-main {
  min-width: 0;
  flex: 1;
}

.pending-title {
  font-size: 13.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pending-title .muted {
  font-weight: 400;
  color: var(--muted);
  font-size: 12.5px;
}

.pending-meta {
  margin-top: 3px;
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pending-meta .sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--muted-2);
}

.pending-side {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}

.pending-amount {
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.pending-foot {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  color: var(--muted-2);
  font-size: 11.5px;
}

.empty {
  padding: 34px 18px;
  text-align: center;
  color: var(--muted);
}

.empty-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 12px;
  border-radius: 16px;
  background: var(--brand-soft);
  color: var(--brand);
  display: grid;
  place-items: center;
}

.empty strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}

.empty p {
  margin-top: 4px;
  font-size: 12.5px;
  color: var(--muted);
}

.empty .btn {
  margin-top: 14px;
}

.process-list {
  display: grid;
  gap: 0;
}

.process-item {
  position: relative;
  display: flex;
  gap: 12px;
  padding-bottom: 18px;
}

.process-item:last-child {
  padding-bottom: 0;
}

.process-item::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 28px;
  bottom: 0;
  width: 1px;
  background: var(--line);
}

.process-item:last-child::before {
  display: none;
}

.process-num {
  width: 27px;
  height: 27px;
  border-radius: 50%;
  flex: none;
  display: grid;
  place-items: center;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: 11px;
  font-weight: 700;
  z-index: 1;
}

.process-item.is-current .process-num {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(13, 124, 102, 0.1);
}

.process-item strong {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.5;
}

.process-item span {
  display: block;
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 1px;
  line-height: 1.5;
}

/* ---------- 表格 ---------- */
.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.table th {
  padding: 11px 14px;
  text-align: left;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.03em;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  background: var(--surface-2);
}

.table th:first-child {
  border-top-left-radius: 10px;
}

.table th:last-child {
  border-top-right-radius: 10px;
}

.table td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.table tbody tr:last-child td {
  border-bottom: 0;
}

.table tbody tr.clickable {
  cursor: pointer;
  transition: background 0.14s var(--ease);
}

.table tbody tr.clickable:hover {
  background: #f7fbf9;
}

.cell-main {
  font-weight: 600;
  font-size: 13px;
}

.cell-sub {
  color: var(--muted);
  font-size: 11.5px;
  margin-top: 2px;
}

.mono {
  font-variant-numeric: tabular-nums;
}

.nowrap {
  white-space: nowrap;
}

.amount {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.amount--muted {
  color: var(--muted-2);
  font-weight: 500;
}

.req-cards {
  display: none;
}

.req-card {
  padding: 15px 16px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: background 0.14s var(--ease);
}

.req-card:last-child {
  border-bottom: 0;
}

.req-card:active {
  background: var(--surface-2);
}

.req-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.req-card-title {
  margin-top: 7px;
  font-size: 15px;
  font-weight: 700;
}

.req-card-foot {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

/* ---------- 筛选 ---------- */
.filter-card {
  padding: 16px;
  margin-bottom: 16px;
}

.filter-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-row + .filter-row {
  margin-top: 12px;
}

.chip-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.chip-tabs::-webkit-scrollbar {
  display: none;
}

.chip-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
  transition:
    background 0.15s var(--ease),
    color 0.15s var(--ease),
    border-color 0.15s var(--ease);
}

.chip-tab:hover {
  border-color: var(--line-strong);
  color: var(--ink-2);
}

.chip-tab.is-active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.chip-tab .count {
  font-size: 11px;
  opacity: 0.72;
  font-variant-numeric: tabular-nums;
}

.filter-controls {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.select--compact,
.input--compact {
  height: 36px;
  border-radius: 9px;
  font-size: 12.5px;
  padding: 0 10px;
}

.select--compact {
  padding-right: 28px;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-box .icon {
  position: absolute;
  left: 10px;
  color: var(--muted-2);
  pointer-events: none;
}

.search-box .input {
  padding-left: 32px;
  width: 190px;
}

/* ---------- 表单 ---------- */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.label {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 2px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2);
}

.label .req {
  color: var(--red);
  margin-left: 1px;
}

.label .opt {
  margin-left: auto;
  font-weight: 400;
  font-size: 11px;
  color: var(--muted-2);
}

.input,
.select,
.textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fbfdfc;
  color: var(--ink);
  padding: 9px 12px;
  font-size: 13.5px;
  transition:
    border-color 0.15s var(--ease),
    box-shadow 0.15s var(--ease),
    background 0.15s var(--ease);
}

.input::placeholder,
.textarea::placeholder {
  color: var(--muted-2);
}

.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--brand);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(13, 124, 102, 0.1);
}

.input:disabled,
.select:disabled {
  background: var(--surface-2);
  color: var(--muted);
  cursor: not-allowed;
}

.textarea {
  min-height: 88px;
  resize: vertical;
  line-height: 1.65;
}

.input-hint {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.6;
}

.input-hint strong {
  color: var(--ink-2);
  font-weight: 600;
}

.input-group {
  position: relative;
}

.input-group .input {
  padding-right: 42px;
}

.input-group .icon-btn {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.form-grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.form-span-2 {
  grid-column: span 2;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.form-note {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  padding: 11px 13px;
  border-radius: 10px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: 12px;
  line-height: 1.65;
}

.form-note .icon {
  margin-top: 2px;
  flex: none;
}

.form-note--amber {
  background: var(--amber-soft);
  color: var(--amber);
}

.form-note--gray {
  background: var(--surface-2);
  color: var(--muted);
}

.form-section {
  padding: 24px;
}

.form-section + .form-section {
  border-top: 1px solid var(--line);
}

.form-section-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 18px;
}

.form-step {
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 9px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
}

.form-section-head strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
}

.form-section-head span {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.duration-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: 11.5px;
  font-weight: 600;
}

.teacher-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.teacher-chip {
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px dashed var(--line-strong);
  background: var(--surface);
  color: var(--muted);
  font-size: 11.5px;
}

.teacher-chip:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.form-page {
  max-width: 860px;
}

.form-card {
  overflow: hidden;
}

.form-page-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 16px;
  padding: 16px 20px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
}

.form-page-actions .hint {
  font-size: 11.5px;
  color: var(--muted);
}

/* ---------- 详情 ---------- */
.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.9fr) minmax(320px, 0.95fr);
  gap: 18px;
  align-items: start;
}

.detail-main,
.detail-side {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.detail-head {
  position: relative;
  overflow: hidden;
  padding: 24px;
  border-radius: var(--radius);
  background:
    radial-gradient(500px 240px at 100% 0%, rgba(42, 157, 143, 0.16), transparent 65%),
    linear-gradient(135deg, #0c3a32 0%, #092b25 100%);
  color: #fff;
  box-shadow: 0 18px 44px rgba(9, 42, 36, 0.16);
}

.detail-head-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.detail-head .badge {
  background: rgba(255, 255, 255, 0.12);
  color: #f6e6bb;
}

.detail-head .badge--green {
  background: rgba(77, 215, 173, 0.16);
  color: #8ff0cf;
}

.detail-head .badge--red {
  background: rgba(255, 120, 110, 0.16);
  color: #ffb4ae;
}

.detail-head .badge--gray {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
}

.detail-head .badge--amber {
  background: rgba(233, 196, 106, 0.16);
  color: #f4d789;
}

.detail-head .badge--blue {
  background: rgba(129, 179, 235, 0.16);
  color: #b6d5f5;
}

.detail-head .badge--violet {
  background: rgba(188, 164, 245, 0.16);
  color: #d7c7fa;
}

.detail-head .badge--orange {
  background: rgba(255, 170, 100, 0.16);
  color: #ffc28f;
}

.detail-head h1 {
  margin-top: 14px;
  font-size: clamp(22px, 2.4vw, 28px);
  line-height: 1.35;
  font-weight: 700;
}

.detail-head .detail-sub {
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.detail-head .detail-sub .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
}

.detail-head-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.detail-amount {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

.detail-amount--muted {
  font-size: 19px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.62);
}

.detail-amount small {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 400;
  margin-left: 6px;
}

.detail-head-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.detail-head-actions .btn--secondary {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.detail-head-actions .btn--danger {
  background: rgba(255, 120, 110, 0.12);
  border-color: rgba(255, 120, 110, 0.3);
  color: #ffb4ae;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 12px;
  padding: 3px 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.back-link:hover {
  color: var(--brand);
}

.steps {
  display: flex;
  padding: 20px 22px;
}

.step {
  position: relative;
  flex: 1;
  min-width: 0;
  text-align: center;
  padding-top: 30px;
}

.step::before {
  content: "";
  position: absolute;
  top: 11px;
  left: -50%;
  width: 100%;
  height: 2px;
  background: var(--line);
}

.step:first-child::before {
  display: none;
}

.step-dot {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--line-strong);
  color: var(--muted-2);
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 700;
  z-index: 1;
}

.step-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

.step-sub {
  font-size: 10.5px;
  color: var(--muted-2);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.step.is-done::before {
  background: var(--brand);
}

.step.is-done .step-dot {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.step.is-done .step-label {
  color: var(--ink-2);
}

.step.is-current .step-dot {
  border-color: var(--brand);
  background: #fff;
  color: var(--brand);
  box-shadow: 0 0 0 4px rgba(13, 124, 102, 0.1);
}

.step.is-current .step-label {
  color: var(--brand-strong);
}

.step.is-warn .step-dot {
  border-color: var(--amber);
  color: var(--amber);
  background: var(--amber-soft);
  box-shadow: 0 0 0 4px rgba(165, 100, 18, 0.08);
}

.step.is-warn .step-label {
  color: var(--amber);
}

.step.is-failed .step-dot {
  border-color: var(--red);
  background: var(--red-soft);
  color: var(--red);
}

.step.is-failed .step-label {
  color: var(--red);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
}

.info-item {
  padding: 13px 0;
  border-bottom: 1px dashed var(--line);
  min-width: 0;
}

.info-item:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.info-item--full {
  grid-column: 1 / -1;
}

.info-label {
  font-size: 11.5px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 5px;
}

.info-value {
  margin-top: 4px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.info-value--normal {
  font-weight: 400;
  color: var(--ink-2);
}

.info-value .sub {
  font-weight: 400;
  color: var(--muted);
  font-size: 12px;
  margin-left: 5px;
}

.cost-empty {
  padding: 20px 0;
  text-align: center;
  color: var(--muted);
  font-size: 12.5px;
}

.cost-empty .icon {
  margin: 0 auto 6px;
}

.cost-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  margin-bottom: 4px;
  border-radius: 12px;
  background: var(--brand-soft);
}

.cost-total span {
  font-size: 12.5px;
  color: var(--brand-strong);
  font-weight: 600;
}

.cost-total strong {
  font-size: 24px;
  font-weight: 700;
  color: var(--brand-strong);
  font-variant-numeric: tabular-nums;
}

.alert {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: 11px;
  font-size: 12.5px;
  line-height: 1.7;
}

.alert--warn {
  background: var(--amber-soft);
  color: var(--amber);
}

.alert--danger {
  background: var(--red-soft);
  color: var(--red);
}

.alert--info {
  background: var(--blue-soft);
  color: var(--blue);
}

.alert strong {
  font-weight: 700;
}

.alert .icon {
  margin-top: 2px;
  flex: none;
}

.action-card {
  padding: 20px;
}

.action-card h3 {
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.action-card .action-desc {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.65;
}

.action-card .form {
  margin-top: 16px;
  display: grid;
  gap: 13px;
}

.action-card .btn-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.action-card .btn-row .btn {
  flex: 1;
}

.timeline {
  display: grid;
  gap: 0;
}

.timeline-item {
  position: relative;
  display: flex;
  gap: 12px;
  padding-bottom: 16px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 30px;
  bottom: 0;
  width: 1px;
  background: var(--line);
}

.timeline-item:last-child::before {
  display: none;
}

.timeline-dot {
  width: 27px;
  height: 27px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--muted);
  z-index: 1;
}

.timeline-dot--green {
  background: var(--green-soft);
  border-color: transparent;
  color: var(--green);
}

.timeline-dot--amber {
  background: var(--amber-soft);
  border-color: transparent;
  color: var(--amber);
}

.timeline-dot--red {
  background: var(--red-soft);
  border-color: transparent;
  color: var(--red);
}

.timeline-body {
  min-width: 0;
  padding-top: 2px;
}

.timeline-title {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2);
}

.timeline-meta {
  margin-top: 2px;
  font-size: 11px;
  color: var(--muted-2);
}

.timeline-comment {
  margin-top: 5px;
  padding: 7px 10px;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.meta-list {
  display: grid;
  gap: 9px;
  font-size: 12.5px;
}

.meta-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.meta-row span:first-child {
  color: var(--muted);
  flex: none;
}

.meta-row span:last-child {
  text-align: right;
  overflow-wrap: anywhere;
}

/* ---------- 月度汇总 ---------- */
.summary-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.month-nav {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
}

.month-nav .icon-btn {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
}

.month-nav input[type="month"] {
  border: 0;
  background: transparent;
  padding: 5px 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  width: 135px;
}

.month-nav input[type="month"]:focus {
  outline: none;
}

.summary-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.summary-stat {
  padding: 16px 18px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.summary-stat .label {
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 500;
  display: block;
}

.summary-stat .value {
  margin-top: 5px;
  font-size: 22px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.summary-stat .value small {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

.summary-stat--brand {
  background: linear-gradient(135deg, #0d3b33, #0a5f4e);
  border-color: transparent;
  color: #fff;
}

.summary-stat--brand .label {
  color: rgba(255, 255, 255, 0.55);
}

.summary-stat--brand .value {
  color: #fff;
}

.summary-table-wrap {
  padding: 0;
  overflow: hidden;
}

.summary-table-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.summary-table-head h2 {
  font-size: 16px;
  font-weight: 700;
}

.summary-table-head p {
  margin-top: 2px;
  font-size: 11.5px;
  color: var(--muted);
}

.summary-table th,
.summary-table td {
  padding: 12px 16px;
}

.summary-table td {
  font-size: 12.5px;
}

.summary-table .col-paid {
  min-width: 92px;
}

.summary-total-row td {
  background: var(--surface-2);
  font-weight: 600;
  border-top: 1px solid var(--line-strong);
}

.paid-mark {
  display: inline-flex;
  flex-direction: column;
  gap: 1px;
}

.paid-mark strong {
  font-size: 12px;
  font-weight: 600;
}

.paid-mark small {
  font-size: 10.5px;
  color: var(--muted-2);
}

.paid-yes {
  color: var(--green);
}

.paid-no {
  color: var(--muted);
  font-weight: 500;
}

.print-head {
  display: none;
}

.scroll-hint {
  display: none;
}

.print-only {
  display: none;
}

/* ---------- 设置 ---------- */
.tabs {
  display: flex;
  gap: 4px;
  padding: 5px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.65);
  overflow-x: auto;
}

.tab {
  padding: 8px 14px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  transition:
    background 0.15s var(--ease),
    color 0.15s var(--ease);
}

.tab:hover {
  color: var(--ink-2);
}

.tab.is-active {
  background: var(--surface);
  color: var(--brand-strong);
  box-shadow: 0 2px 8px rgba(14, 56, 45, 0.08);
}

.settings-grid {
  display: grid;
  gap: 16px;
}

.settings-card {
  padding: 22px;
}

.settings-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.settings-card-head h2 {
  font-size: 15px;
  font-weight: 700;
}

.settings-card-head p {
  margin-top: 3px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}

.user-self {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.user-self-main {
  min-width: 0;
}

.user-self-name {
  font-size: 14px;
  font-weight: 700;
}

.user-self-meta {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.config-wrap {
  display: grid;
  gap: 14px;
}

.config-kg {
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-2);
  overflow: hidden;
}

.config-kg-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.config-kg-head .input {
  border-color: transparent;
  background: transparent;
  font-weight: 700;
  font-size: 13.5px;
  padding-left: 2px;
}

.config-kg-head .input:hover {
  background: var(--surface-2);
}

.config-kg-body {
  padding: 12px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 12px;
  color: var(--ink-2);
}

.chip-x {
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted-2);
  display: grid;
  place-items: center;
  padding: 0;
}

.chip-x:hover {
  background: var(--red-soft);
  color: var(--red);
}

.chip-x .icon {
  width: 12px;
  height: 12px;
}

.inline-add {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  max-width: 340px;
}

.inline-add .input {
  height: 34px;
  font-size: 12.5px;
}

.inline-add .btn {
  height: 34px;
}

.save-bar {
  position: sticky;
  bottom: 12px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  margin-top: 4px;
  border-radius: 13px;
  background: rgba(11, 49, 43, 0.95);
  color: #fff;
  box-shadow: 0 16px 36px rgba(9, 42, 36, 0.24);
  backdrop-filter: blur(8px);
}

.save-bar span {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.62);
}

.warn-list {
  margin: 8px 0 0;
  padding-left: 18px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.8;
}

/* ---------- 弹窗 / 提示 ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(6, 24, 20, 0.46);
  backdrop-filter: blur(4px);
  animation: fade-in 0.18s ease;
}

.modal {
  width: min(520px, 100%);
  max-height: min(86vh, 760px);
  overflow: auto;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 30px 80px rgba(4, 24, 19, 0.3);
  animation: modal-in 0.22s var(--ease);
}

.modal--wide {
  width: min(680px, 100%);
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 22px 24px 0;
}

.modal-head h2 {
  font-size: 18px;
  font-weight: 700;
}

.modal-head p {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

.modal-body {
  padding: 18px 24px;
}

.modal-body .form {
  display: grid;
  gap: 14px;
}

.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  padding: 0 24px 22px;
  flex-wrap: wrap;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.99);
  }
}

body.modal-open {
  overflow: hidden;
}

.toast-root {
  position: fixed;
  z-index: 120;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  width: min(440px, calc(100vw - 32px));
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 11px;
  background: #0b312b;
  color: #fff;
  font-size: 12.5px;
  line-height: 1.6;
  box-shadow: 0 16px 36px rgba(4, 24, 19, 0.28);
  animation: toast-in 0.24s var(--ease);
  pointer-events: auto;
  max-width: 100%;
}

.toast .icon {
  margin-top: 2px;
}

.toast--error {
  background: #7a271a;
}

.toast--info {
  background: #1e3a5f;
}

.toast.is-leaving {
  animation: toast-out 0.2s ease forwards;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateY(6px);
  }
}

/* ---------- 骨架屏 ---------- */
.skeleton {
  border-radius: 10px;
  background: linear-gradient(90deg, #eef4f1 25%, #f7faf8 37%, #eef4f1 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
}

@keyframes shimmer {
  from {
    background-position: 100% 50%;
  }
  to {
    background-position: 0 50%;
  }
}

.skeleton-view {
  display: grid;
  gap: 16px;
}

.skeleton-hero {
  height: 190px;
  border-radius: 24px;
}

.skeleton-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.skeleton-stat {
  height: 116px;
  border-radius: 18px;
}

.skeleton-block {
  height: 300px;
  border-radius: 18px;
}

/* ---------- 错误页 ---------- */
.fatal {
  min-height: 100vh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 12px;
  padding: 32px;
  text-align: center;
}

.fatal h1 {
  font-size: 20px;
}

.fatal p {
  color: var(--muted);
  font-size: 13px;
  max-width: 420px;
}

/* ---------- 响应式 ---------- */
@media (max-width: 1180px) {
  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dash-grid {
    grid-template-columns: 1fr;
  }

  .hero-art {
    width: 170px;
  }
}

@media (max-width: 1020px) {
  .sidebar {
    width: 224px;
  }

  .main {
    margin-left: 224px;
  }

  .content {
    padding: 24px 24px 60px;
  }

  .topbar {
    padding: 0 24px;
  }

  .detail-layout {
    grid-template-columns: 1fr;
  }

  .detail-side {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }
}

@media (max-width: 900px) {
  .sidebar {
    width: 268px;
    transform: translateX(-102%);
    transition: transform 0.26s var(--ease);
    box-shadow: 30px 0 60px rgba(4, 24, 19, 0.24);
  }

  body.nav-open .sidebar {
    transform: translateX(0);
  }

  .sidebar .nav-item.is-active::before {
    left: -16px;
  }

  .nav-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 39;
    background: rgba(6, 24, 20, 0.4);
    backdrop-filter: blur(2px);
  }

  body.nav-open .nav-backdrop {
    display: block;
  }

  .main {
    margin-left: 0;
  }

  .menu-btn {
    display: inline-grid;
  }

  .breadcrumb-root,
  .breadcrumb-sep {
    display: none;
  }

  .breadcrumb-current {
    font-size: 17px;
    font-weight: 700;
  }

  .topbar {
    height: 64px;
    padding: 0 16px;
  }

  .topbar-date {
    display: none;
  }

  .content {
    padding: 20px 16px 92px;
  }

  .mobile-nav {
    position: fixed;
    z-index: 35;
    left: 12px;
    right: 12px;
    bottom: 12px;
    display: flex;
    align-items: stretch;
    justify-content: space-around;
    padding: 6px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--line);
    box-shadow: 0 12px 34px rgba(9, 42, 36, 0.14);
    backdrop-filter: blur(14px);
  }

  .mobile-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 6px 4px;
    border: 0;
    border-radius: 11px;
    background: transparent;
    color: var(--muted);
    font-size: 10px;
    font-weight: 500;
  }

  .mobile-nav-item.is-active {
    background: var(--brand-soft);
    color: var(--brand-strong);
  }

  .mobile-nav-item .icon {
    width: 19px;
    height: 19px;
  }

  .toast-root {
    bottom: 82px;
  }

  .auth {
    grid-template-columns: 1fr;
  }

  .auth-brand {
    padding: 26px 24px;
    min-height: auto;
  }

  .auth-brand h1 {
    margin-top: 26px;
    font-size: 26px;
  }

  .auth-brand .lead,
  .auth-points,
  .auth-brand-foot {
    display: none;
  }

  .auth-main {
    padding: 30px 20px 48px;
    align-items: flex-start;
  }

  .auth-card {
    max-width: 440px;
  }

  .detail-side {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .page-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .page-head h1 {
    font-size: 22px;
  }

  .hero {
    padding: 24px;
    border-radius: 20px;
  }

  .hero-art {
    display: none;
  }

  .hero-actions .btn {
    height: 38px;
  }

  .stat-grid {
    gap: 10px;
  }

  .stat {
    padding: 14px;
  }

  .stat-value {
    font-size: 22px;
  }

  .form-grid,
  .form-grid--3 {
    grid-template-columns: 1fr;
  }

  .form-span-2 {
    grid-column: auto;
  }

  .form-section {
    padding: 18px;
  }

  .form-page-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .form-page-actions .form-actions {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    width: 100%;
    gap: 8px;
  }

  .form-page-actions .btn {
    width: 100%;
  }

  .filter-controls {
    margin-left: 0;
    width: 100%;
    flex-wrap: nowrap;
  }

  .search-box {
    flex: 1;
    width: auto;
    min-width: 0;
  }

  .search-box .input {
    width: 100%;
  }

  .chip-tabs {
    flex-wrap: wrap;
    overflow: visible;
  }

  .summary-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .summary-table {
    min-width: 720px;
  }

  .scroll-hint {
    display: inline;
    margin-left: 6px;
    color: var(--muted-2);
    font-size: 11px;
  }

  .summary-toolbar > .badge {
    display: none;
  }

  .detail-side {
    order: -1;
  }

  .detail-side > .card:not(.action-card) {
    display: none;
  }

  body.no-mobile-nav .content {
    padding-bottom: 32px;
  }

  .request-table-wrap {
    display: none;
  }

  .req-cards {
    display: block;
  }

  .steps {
    padding: 16px 10px;
  }

  .step-label {
    font-size: 10.5px;
  }

  .step-sub {
    display: none;
  }

  .pending-side .btn {
    display: inline-flex;
  }

  .pending-item {
    flex-wrap: wrap;
    row-gap: 8px;
  }

  .pending-main {
    flex: 1 1 calc(100% - 70px);
  }

  .pending-side {
    width: 100%;
    padding-left: 66px;
    justify-content: flex-start;
  }

  .recent-table th:nth-child(4),
  .recent-table td:nth-child(4) {
    display: none;
  }

  .recent-table th,
  .recent-table td {
    padding-left: 8px;
    padding-right: 8px;
  }

  .detail-head {
    padding: 20px;
  }

  .detail-amount {
    font-size: 26px;
  }

  .side-user-name {
    max-width: 130px;
  }

  .topbar-sub {
    display: none;
  }

  .user-chip-name,
  .user-chip-role {
    display: none;
  }

  .user-chip {
    padding: 3px;
  }

  .user-chip .avatar {
    width: 32px;
    height: 32px;
  }

  .modal-backdrop {
    padding: 12px;
    align-items: end;
  }

  .modal {
    max-height: 90vh;
    border-radius: 18px 18px 12px 12px;
  }

  .modal-head,
  .modal-body,
  .modal-foot {
    padding-left: 18px;
    padding-right: 18px;
  }

  .config-kg-head .input {
    font-size: 13px;
  }

  .summary-calendar {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 23px;
  }

  .auth-brand h1 {
    font-size: 22px;
  }

  .auth-brand {
    padding: 22px 20px;
  }

  .auth-card h2 {
    font-size: 23px;
  }

  .mobile-nav {
    left: 8px;
    right: 8px;
    bottom: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* ---------- 打印 ---------- */
@media print {
  @page {
    size: A4 landscape;
    margin: 10mm;
  }

  body {
    background: #fff !important;
  }

  body::before,
  .sidebar,
  .topbar,
  .mobile-nav,
  .nav-backdrop,
  .summary-toolbar,
  .summary-stats,
  .page-head-actions,
  .toast-root,
  .no-print {
    display: none !important;
  }

  .main {
    margin: 0 !important;
  }

  .content {
    max-width: none;
    padding: 0 !important;
  }

  .page-head {
    display: none;
  }

  .summary-table-wrap {
    border: 0;
    box-shadow: none;
  }

  .summary-table-head {
    padding: 0 0 8px;
    border-bottom: 0;
  }

  .print-head {
    display: block;
    margin-bottom: 10px;
  }

  .print-head h1 {
    font-size: 18px;
    text-align: center;
  }

  .print-head p {
    text-align: center;
    font-size: 11px;
    color: #444;
    margin-top: 4px;
  }

  .print-only {
    display: block;
  }

  .summary-table {
    min-width: 0 !important;
    font-size: 10.5px;
  }

  .summary-table th,
  .summary-table td {
    padding: 6px 8px;
    border: 1px solid #999;
  }

  .summary-table th {
    background: #f0f0f0;
    color: #222;
  }

  .badge {
    background: transparent !important;
    color: #222 !important;
    padding: 0;
  }

  .badge::before {
    display: none;
  }

  .summary-table tr {
    break-inside: avoid;
  }
}
