:root {
  --ink: #292922;
  --ink-soft: #64645a;
  --ink-faint: #77776b;
  --paper: #f5f4ef;
  --paper-deep: #eeede5;
  --paper-soft: #fffefb;
  --line: #e1dfd5;
  --line-strong: #c1bcae;
  --black: #252720;
  --white: #ffffff;
  --accent: #aa4b30;
  --accent-dk: #80361f;
  --accent-bg: #f8ebe4;
  --gold: #a97723;
  --green: #22745b;
  --green-bg: rgba(34, 116, 91, 0.1);
  --warn: #b42318;
  --warn-bg: rgba(180, 35, 24, 0.1);
  --blue: #255f85;
  --blue-bg: rgba(37, 95, 133, 0.1);
  --purple: #73508b;
  --purple-bg: rgba(115, 80, 139, 0.1);
  --sb-w: 248px;
  --top-h: 76px;
  --r: 10px;
  --sh: 0 2px 8px rgba(41, 41, 34, 0.025);
  --sh-lg: 0 26px 70px rgba(21, 19, 15, 0.24);
  --font-display: "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", serif;
  --font-body: "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", Georgia, serif;
  --font-ui: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --font-latin: "Avenir Next", "Gill Sans", "Trebuchet MS", sans-serif;
  --font-mono: "SF Mono", Menlo, Consolas, monospace;
  --control-text-shift: 0px;
  --bg: var(--paper);
  --surface: var(--paper-soft);
  --surface2: var(--paper-deep);
  --border: var(--line);
  --text: var(--ink);
  --muted: var(--ink-soft);
  --subtle: var(--ink-faint);
  --mid: var(--ink-soft);
  --light: var(--ink-faint);
  --hover-bg: var(--paper-deep);
  --ease: cubic-bezier(0, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
  --t-micro: 150ms;
  --t-base: 180ms;
  --t-slow: 280ms;
}

[x-cloak] { display: none !important; }
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { min-height: 100%; }
body {
  min-height: 100%;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}


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


@keyframes page-settle {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes card-rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

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

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

@keyframes soft-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(180, 55, 36, 0); }
  45% { box-shadow: 0 0 0 5px rgba(180, 55, 36, 0.08); }
}

.app { display: flex; min-height: 100vh; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  width: var(--sb-w);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  background: var(--black);
  color: #f5ecdc;
  border-right: 1px solid rgba(255, 253, 248, 0.12);
}

.sb-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 28px 22px;
  border-bottom: 1px solid rgba(255, 253, 248, 0.09);
}

.sb-logo {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: block;
}

.sb-name {
  font-family: var(--font-latin);
  font-size: 21px;
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -0.5px;
}

.sb-ver {
  margin-top: 8px;
  font-family: var(--font-latin);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #bdb29f;
}

.sb-nav { flex: 1; padding: 18px 12px; }

.nav-label {
  margin: 22px 10px 8px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.13em;
  color: #b3b4a6;
}
.nav-label:first-child { margin-top: 0; }

.nav-item {
  width: 100%;
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: var(--r);
  background: transparent;
  color: #d8cdbb;
  text-decoration: none;
  cursor: pointer;
  font-family: var(--font-ui);
  font-size: 13px;
  line-height: 1.2;
  text-align: left;
  transition: background var(--t-base) var(--ease), color var(--t-base) var(--ease),
              border-color var(--t-base) var(--ease), transform var(--t-base) var(--ease);
}

.nav-item svg { flex: 0 0 auto; }
.nav-item:hover {
  background: rgba(255, 253, 248, 0.07);
  border-color: rgba(255, 253, 248, 0.1);
  color: var(--white);
  transform: translateX(3px);
}
.nav-item.active {
  background: var(--paper);
  border-color: var(--paper);
  color: var(--black);
  transform: translateX(0);
}

.nav-badge {
  margin-left: auto;
  min-width: 24px;
  height: 19px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.1);
  color: #d8cdbb;
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 700;
}
.nav-item.active .nav-badge { background: var(--black); color: var(--paper); }

.sb-footer {
  margin: 0 12px 14px;
  padding: 14px;
  border: 1px solid rgba(255, 253, 248, 0.16);
  border-radius: var(--r);
  background: rgba(255, 253, 248, 0.05);
  font-family: var(--font-ui);
  font-size: 12px;
}

.sb-status-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-weight: 800;
  color: var(--white);
}
.dot-live {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #4fb286;
  box-shadow: 0 0 0 4px rgba(79, 178, 134, 0.16);
}
.sb-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 3px 0;
  color: #bdb29f;
}
.sb-row-val { color: #f5ecdc; font-weight: 700; }

.app-main {
  flex: 1;
  min-height: 100vh;
  min-width: 0;
  margin-left: var(--sb-w);
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  height: var(--top-h);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 28px;
  background: rgba(245, 244, 239, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.topbar-title {
  font-family: var(--font-ui);
  font-size: 17px;
  font-weight: 650;
  line-height: 1.4;
}
.topbar-title::before {
  content: none;
}
.ver-tag {
  margin-left: auto;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper-soft);
  color: var(--ink-soft);
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 700;
}

.content {
  flex: 1;
  width: min(100%, 1380px);
  min-width: 0;
  max-width: 100%;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.stat-card,
.card,
.about-section,
.modal {
  background: var(--paper-soft);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--sh);
}

.stat-card {
  min-height: 120px;
  padding: 22px;
  position: relative;
  overflow: hidden;
}
.stat-card::after {
  content: none;
}
.stat-label {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-soft);
}
.stat-value {
  margin-top: 12px;
  color: var(--black);
  font-family: var(--font-latin), var(--font-ui);
  font-size: 34px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.card {
  max-width: 100%;
  overflow: hidden;
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
  background: transparent;
}
.card-title,
.cat-title,
.items-path,
.log-title {
  font-size: 18px;
  font-weight: 900;
  color: var(--black);
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(239, 229, 210, 0.4);
}
.toolbar-end { margin-left: auto; }

.search-box,
.rt-search,
.field input,
.field select,
.rd-search-input {
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--paper-soft);
  color: var(--ink);
  transition: border-color var(--t-base), box-shadow var(--t-base);
}
.search-box {
  flex: 1;
  min-width: 180px;
  max-width: 320px;
  height: 34px;
  padding: 0 11px;
  font-family: var(--font-ui);
  font-size: 13px;
}
.rt-search {
  height: 30px;
  padding: 0 10px;
  font-family: var(--font-ui);
  font-size: 13px;
}
.search-box:focus,
.rt-search:focus,
.field input:focus,
.field select:focus,
.rd-search-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(180, 55, 36, 0.12);
}

.filter-btns { display: flex; gap: 5px; flex-wrap: wrap; }
.fbtn,
.btn-small,
.btn,
.tpager-btn,
.pager-btn,
.rd-tab,
.rd-filter-btn,
.rd-mark-all,
.rd-admin,
.rd-search-submit,
.bm-link,
.bm-remove,
.sum-gen-btn,
.rd-summarize-btn {
  font-family: var(--font-ui);
}

