/* =========================================================
   织序 · 软体家具工艺参数管控系统
   基础设计系统 / 应用外壳 / 通用组件
   ========================================================= */
:root {
  --bg: #f2eee5;
  --bg-deep: #eae4d7;
  --panel: #fdfbf6;
  --panel-2: #f8f4ea;
  --ink: #171c21;
  --ink-2: #232a31;
  --ink-3: #2e363f;
  --text: #23272c;
  --text-2: #6d675c;
  --text-3: #948c7d;
  --line: #e3dbcb;
  --line-strong: #d3c8b3;
  --brass: #b5813c;
  --brass-2: #d3a664;
  --brass-3: #f0dfc2;
  --jade: #2f6b5c;
  --jade-2: #e3efe9;
  --clay: #b1513a;
  --clay-2: #f6e4de;
  --indigo: #3c5a78;
  --indigo-2: #e5ecf3;
  --amber: #a9761c;
  --amber-2: #f7ecd4;
  --font-ui: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-display: "Palatino Linotype", "Iowan Old Style", "Songti SC", "STSong", "SimSun", serif;
  --font-mono: "Cascadia Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --shadow-1: 0 1px 0 rgba(255, 255, 255, .7) inset, 0 12px 28px -22px rgba(50, 38, 18, .55);
  --shadow-2: 0 2px 0 rgba(255, 255, 255, .6) inset, 0 24px 50px -30px rgba(50, 38, 18, .55);
  --shadow-modal: 0 2px 0 rgba(255,255,255,.55) inset, 0 50px 100px -34px rgba(16, 20, 24, .62), 0 12px 30px -18px rgba(16,20,24,.36);
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --sidebar-w: 276px;
  --topbar-h: 70px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body {
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(1200px 600px at 8% -10%, rgba(181, 129, 60, .10), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, rgba(47, 107, 92, .07), transparent 55%),
    repeating-linear-gradient(90deg, rgba(120, 100, 70, .028) 0 1px, transparent 1px 6px);
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4, h5 { margin: 0; font-weight: 600; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
img, svg { display: block; }
::selection { background: rgba(181, 129, 60, .22); }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(120, 105, 80, .24); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: rgba(120, 105, 80, .4); }

.ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.ic-sm { width: 15px; height: 15px; }
.ic-lg { width: 22px; height: 22px; }
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ============ 应用骨架 ============ */
.rt-app { display: flex; min-height: 100vh; background: transparent; }
.rt-app::before { z-index: 0; }

.sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  background:
    linear-gradient(180deg, #1a2026 0%, #141a1f 46%, #11161a 100%);
  color: #cfc8ba;
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(181, 129, 60, .16);
  box-shadow: 24px 0 60px -50px rgba(0, 0, 0, .9);
}
.sidebar::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .5;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .022) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .018) 0 1px, transparent 1px 5px),
    radial-gradient(400px 240px at 20% 0%, rgba(181, 129, 60, .12), transparent 70%);
}
.sidebar::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0; right: 0;
  width: 3px;
  background: linear-gradient(180deg, transparent, rgba(181, 129, 60, .38), transparent);
  opacity: .5;
}

.brand {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 22px 20px;
  border-bottom: 1px dashed rgba(220, 205, 180, .14);
}
.brand-mark {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border: 1px solid rgba(211, 166, 100, .42);
  background: linear-gradient(150deg, rgba(211, 166, 100, .16), rgba(211, 166, 100, .02));
  border-radius: 10px;
  color: #e5c795;
  flex: 0 0 auto;
}
.brand-mark svg { width: 24px; height: 24px; }
.brand-copy { min-width: 0; }
.brand-name {
  display: flex; align-items: baseline; gap: 7px;
  color: #f2ead9; font-family: var(--font-display); font-size: 18px; letter-spacing: .12em;
}
.brand-name small { font-family: var(--font-ui); font-size: 10px; letter-spacing: .1em; color: rgba(211, 166, 100, .75); }
.brand-sub {
  display: block; margin-top: 2px;
  font-size: 10px; letter-spacing: .16em; color: rgba(207, 200, 186, .48); text-transform: uppercase;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.nav-scroll { position: relative; z-index: 1; flex: 1; overflow-y: auto; padding: 12px 12px 18px; }
.nav-scroll::-webkit-scrollbar-thumb { background: rgba(211, 166, 100, .2); }
.nav-group { margin-top: 12px; }
.nav-group:first-child { margin-top: 4px; }
.nav-group-head {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 12px 7px;
  color: rgba(207, 200, 186, .42);
  font-size: 10.5px; letter-spacing: .14em;
}
.nav-group-head .ng-index {
  font-family: var(--font-mono); font-size: 9.5px; color: rgba(211, 166, 100, .55);
  border: 1px solid rgba(211, 166, 100, .25); border-radius: 4px; padding: 0 4px; line-height: 1.5;
}
.nav-group-head .ng-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-link {
  position: relative;
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; margin: 2px 0;
  border-radius: 8px;
  color: rgba(219, 213, 200, .72);
  font-size: 13px;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}
.nav-link .ic { width: 16px; height: 16px; opacity: .7; }
.nav-link:hover { background: rgba(255, 255, 255, .045); color: #f2ead9; }
.nav-link.active {
  background: linear-gradient(90deg, rgba(181, 129, 60, .22), rgba(181, 129, 60, .05) 60%, transparent);
  color: #f7eeda;
}
.nav-link.active .ic { opacity: 1; color: var(--brass-2); }
.nav-link.active::before {
  content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 2px;
  background: linear-gradient(180deg, var(--brass-2), var(--brass));
  border-radius: 2px;
  box-shadow: 0 0 12px rgba(211, 166, 100, .5);
}
.nav-link .nav-badge {
  margin-left: auto; font-family: var(--font-mono); font-size: 10px;
  background: rgba(177, 81, 58, .22); color: #e8a894; border: 1px solid rgba(177, 81, 58, .3);
  padding: 0 5px; border-radius: 4px;
}
.sidebar-foot {
  position: relative; z-index: 1;
  padding: 14px 18px 16px;
  border-top: 1px dashed rgba(220, 205, 180, .13);
  font-size: 10.5px; line-height: 1.7; color: rgba(207, 200, 186, .38);
}
.sidebar-foot strong { color: rgba(232, 224, 208, .7); font-weight: 500; display: block; letter-spacing: .04em; }
.sidebar-foot .sf-ver { font-family: var(--font-mono); color: rgba(211, 166, 100, .62); }

.app-body {
  flex: 1;
  margin-left: var(--sidebar-w);
  min-width: 0;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
}
.topbar {
  height: var(--topbar-h);
  flex: 0 0 var(--topbar-h);
  display: flex; align-items: center; gap: 18px;
  padding: 0 28px;
  background: rgba(248, 244, 235, .82);
  backdrop-filter: blur(14px) saturate(1.1);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 30;
}
.topbar::after {
  content: ""; position: absolute; left: 28px; right: 28px; bottom: -1px; height: 1px;
  background: repeating-linear-gradient(90deg, rgba(181,129,60,.35) 0 5px, transparent 5px 11px);
  opacity: .5;
}
.tb-toggle { display: none; }
.crumbs { display: flex; align-items: center; gap: 8px; min-width: 0; }
.crumbs .cb-group { font-size: 12px; color: var(--text-3); white-space: nowrap; }
.crumbs .cb-sep { color: var(--line-strong); font-family: var(--font-mono); }
.crumbs .cb-current { font-size: 14px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crumbs .cb-code {
  font-family: var(--font-mono); font-size: 10px; color: var(--brass);
  border: 1px solid rgba(181, 129, 60, .3); border-radius: 4px; padding: 0 4px; line-height: 1.6;
}
.tb-search {
  margin-left: auto;
  position: relative;
  width: min(320px, 30vw);
}
.tb-search .ic { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--text-3); width: 15px; height: 15px; }
.tb-search input {
  width: 100%; height: 38px;
  padding: 0 52px 0 34px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, .8);
  outline: none;
  transition: border-color .18s, box-shadow .18s;
}
.tb-search input:focus { border-color: var(--brass-2); box-shadow: 0 0 0 3px rgba(181, 129, 60, .1); }
.tb-search kbd {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  font-family: var(--font-mono); font-size: 10px; color: var(--text-3);
  border: 1px solid var(--line); background: #fffdf8; border-radius: 4px; padding: 1px 5px;
}
.tb-actions { display: flex; align-items: center; gap: 6px; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 9px;
  display: grid; place-items: center;
  border: 1px solid transparent; background: transparent; color: var(--text-2);
  position: relative; transition: .18s;
}
.icon-btn:hover { background: rgba(181, 129, 60, .08); color: var(--ink); border-color: rgba(181, 129, 60, .18); }
.icon-btn .dot {
  position: absolute; top: 8px; right: 9px; width: 6px; height: 6px; border-radius: 50%;
  background: var(--clay); box-shadow: 0 0 0 2px var(--bg);
}
.tb-divider { width: 1px; height: 26px; background: var(--line); margin: 0 4px; }
.tb-user { display: flex; align-items: center; gap: 10px; padding: 4px 8px 4px 4px; border-radius: 10px; cursor: pointer; transition: .18s; }
.tb-user:hover { background: rgba(181, 129, 60, .07); }
.avatar {
  width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center;
  background: linear-gradient(150deg, #c49a5c, #8d5f26);
  color: #fff8ea; font-family: var(--font-display); font-size: 14px; letter-spacing: .04em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35);
  flex: 0 0 auto;
}
.tb-user-meta { line-height: 1.25; }
.tb-user-meta b { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink); }
.tb-user-meta span { font-size: 10.5px; color: var(--text-3); }
.tb-user > .ic { color: var(--text-3); width: 14px; height: 14px; }

.main-wrap { padding: 26px 30px 12px; flex: 1; min-width: 0; }
.rt-main { min-height: 60vh; position: relative; }
.app-foot {
  padding: 14px 30px 20px;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  color: var(--text-3); font-size: 11px; letter-spacing: .04em;
  border-top: 1px dashed var(--line);
  margin-top: 10px;
}
.app-foot .af-links { display: flex; gap: 16px; }

/* ============ 下拉面板 ============ */
.dropdown {
  position: absolute; top: calc(100% + 10px); right: 0;
  min-width: 220px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-2);
  padding: 6px;
  z-index: 80;
  opacity: 0; transform: translateY(-6px) scale(.98); pointer-events: none;
  transition: .18s ease;
}
.dropdown.open { opacity: 1; transform: none; pointer-events: auto; }
.dropdown::before {
  content: ""; position: absolute; inset: 0; border-radius: 12px; pointer-events: none;
  border-top: 1px solid rgba(181, 129, 60, .35);
}
.dd-head { padding: 10px 12px 8px; font-size: 11px; letter-spacing: .1em; color: var(--text-3); border-bottom: 1px dashed var(--line); margin-bottom: 4px; }
.dd-item { display: flex; align-items: center; gap: 9px; padding: 9px 12px; border-radius: 7px; font-size: 13px; color: var(--text); cursor: pointer; transition: .15s; }
.dd-item:hover { background: rgba(181, 129, 60, .08); }
.dd-item .ic { width: 15px; height: 15px; color: var(--text-3); }
.dd-item.danger { color: var(--clay); }
.dd-item.danger .ic { color: var(--clay); }
.dd-sep { height: 1px; background: var(--line); margin: 5px 8px; }

/* 通知 */
.notice-panel { width: 360px; padding: 0; }
.notice-panel .np-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.notice-panel .np-head b { font-size: 13px; }
.notice-panel .np-head span { font-size: 11px; color: var(--brass); cursor: pointer; }
.notice-list { max-height: 360px; overflow-y: auto; padding: 6px; }
.notice-item { display: flex; gap: 10px; padding: 10px; border-radius: 8px; cursor: pointer; transition: .15s; }
.notice-item:hover { background: var(--panel-2); }
.notice-item .ni-dot { width: 6px; height: 6px; border-radius: 50%; margin-top: 7px; flex: 0 0 auto; background: var(--brass); }
.notice-item.read .ni-dot { background: var(--line-strong); }
.notice-item .ni-title { font-size: 12.5px; font-weight: 500; }
.notice-item .ni-meta { font-size: 10.5px; color: var(--text-3); margin-top: 2px; }
.notice-empty { padding: 30px; text-align: center; color: var(--text-3); font-size: 12px; }

/* ============ 页面头 ============ */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head-main .eyebrow {
  display: flex; align-items: center; gap: 8px;
  color: var(--brass); font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; margin-bottom: 8px;
}
.page-head-main .eyebrow::before { content: ""; width: 18px; height: 1px; background: var(--brass); }
.page-title { font-family: var(--font-display); font-size: 28px; line-height: 1.25; letter-spacing: .02em; color: var(--ink); font-weight: 600; }
.page-desc { margin-top: 6px; color: var(--text-2); font-size: 12.5px; max-width: 720px; }
.page-head-side { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ============ 按钮 ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 38px; padding: 0 15px;
  border-radius: 9px; border: 1px solid var(--line-strong);
  background: linear-gradient(180deg, #fffdf8, #f6f1e6);
  color: var(--text);
  font-size: 13px; font-weight: 500; letter-spacing: .02em;
  transition: transform .16s, box-shadow .16s, background .16s, border-color .16s;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .8) inset, 0 6px 14px -12px rgba(60, 45, 20, .6);
  white-space: nowrap;
}
.btn:hover { border-color: var(--brass-2); transform: translateY(-1px); box-shadow: 0 1px 0 rgba(255,255,255,.9) inset, 0 12px 20px -14px rgba(120, 85, 30, .5); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn .ic { width: 16px; height: 16px; }
.btn-primary {
  background: linear-gradient(160deg, #c19250 0%, #b5813c 46%, #9c6b2c 100%);
  border-color: #a5732f; color: #fffaf0;
  box-shadow: inset 0 1px 0 rgba(255, 246, 228, .4), 0 10px 22px -14px rgba(120, 80, 20, .9);
}
.btn-primary:hover { background: linear-gradient(160deg, #cb9c58, #b5813c 52%, #a06f2e); border-color: #8f5f22; }
.btn-dark { background: linear-gradient(160deg, #2a323a, #1a2026); border-color: #141a1f; color: #ece4d4; }
.btn-dark:hover { background: linear-gradient(160deg, #333c46, #20272e); }
.btn-danger { color: var(--clay); border-color: rgba(177, 81, 58, .32); background: linear-gradient(180deg, #fff8f5, #fbeee8); }
.btn-danger:hover { border-color: var(--clay); }
.btn-ghost { background: transparent; border-color: var(--line); box-shadow: none; }
.btn-ghost:hover { background: rgba(181, 129, 60, .06); }
.btn-sm { height: 31px; padding: 0 11px; font-size: 12px; border-radius: 7px; }
.btn-sm .ic { width: 14px; height: 14px; }
.btn-xs { height: 26px; padding: 0 8px; font-size: 11.5px; border-radius: 6px; gap: 4px; }
.btn-xs .ic { width: 12px; height: 12px; }
.btn-lg { height: 44px; padding: 0 20px; font-size: 14px; border-radius: 10px; }
.btn-block { width: 100%; }
.btn-link { border: none; background: none; padding: 0; height: auto; color: var(--brass); box-shadow: none; font-size: 12px; }
.btn-link:hover { transform: none; box-shadow: none; text-decoration: underline; }
.btn-group { display: inline-flex; gap: 8px; flex-wrap: wrap; }

/* ============ 卡片 / 面板 ============ */
.card {
  background: linear-gradient(180deg, rgba(255, 253, 248, .96), rgba(249, 245, 236, .96));
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-1);
  position: relative;
}
.card-pad { padding: 20px 22px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 20px; border-bottom: 1px dashed var(--line); }
.card-head h3 { font-size: 14px; letter-spacing: .02em; display: flex; align-items: center; gap: 8px; }
.card-head h3 .ic { color: var(--brass); width: 16px; height: 16px; }
.card-head .ch-sub { font-size: 11px; color: var(--text-3); }
.panel-head .ch-sub { font-size: 11px; color: var(--text-3); }
.panel-head .ch-sub .btn-link { color: var(--brass); }
.card-body { padding: 18px 20px; }
.card-stitch::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 7px; height: 1px;
  background: repeating-linear-gradient(90deg, rgba(181, 129, 60, .3) 0 4px, transparent 4px 9px);
  opacity: .5;
}

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-1); overflow: hidden; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 20px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, rgba(255,253,248,.7), transparent); }
.panel-head h3 { font-size: 13.5px; }
.panel-body { padding: 18px 20px; }

/* KPI */
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.kpi {
  padding: 17px 18px 15px; border-radius: var(--r-md);
  background: linear-gradient(165deg, #fffdf8, #f7f2e7);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-1);
  position: relative; overflow: hidden;
}
.kpi::after {
  content: ""; position: absolute; top: 0; right: 0; width: 74px; height: 74px;
  background: radial-gradient(circle at 70% 30%, rgba(181, 129, 60, .12), transparent 65%);
}
.kpi-label { font-size: 11.5px; color: var(--text-3); letter-spacing: .06em; display: flex; align-items: center; gap: 6px; }
.kpi-label .ic { width: 14px; height: 14px; color: var(--brass); }
.kpi-value { font-family: var(--font-display); font-size: 32px; line-height: 1.2; color: var(--ink); margin-top: 9px; letter-spacing: .01em; }
.kpi-value em { font-family: var(--font-ui); font-style: normal; font-size: 12px; color: var(--text-3); margin-left: 4px; letter-spacing: 0; }
.kpi-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; font-size: 11px; color: var(--text-3); }
.kpi-delta { font-family: var(--font-mono); font-size: 11px; }
.kpi-delta.up { color: var(--jade); }
.kpi-delta.down { color: var(--clay); }
.kpi-spark { position: absolute; right: 12px; bottom: 12px; opacity: .8; }

/* ============ 工具条 / 筛选 ============ */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .spacer { flex: 1; }
.filter-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 12px 14px; margin-bottom: 14px;
  background: rgba(250, 247, 240, .8); border: 1px solid var(--line); border-radius: 10px;
}
.filter-bar .fb-label { font-size: 11px; color: var(--text-3); letter-spacing: .08em; }
.search-field { position: relative; }
.search-field .ic { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 14px; height: 14px; color: var(--text-3); }
.search-field input { height: 34px; padding: 0 12px 0 31px; border: 1px solid var(--line); border-radius: 7px; background: #fffdf8; outline: none; min-width: 210px; transition: .16s; }
.search-field input:focus { border-color: var(--brass-2); box-shadow: 0 0 0 3px rgba(181, 129, 60, .09); }
.select-mini { height: 34px; padding: 0 30px 0 11px; border: 1px solid var(--line); border-radius: 7px; background: #fffdf8; outline: none; font-size: 12.5px; appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-3) 50%), linear-gradient(135deg, var(--text-3) 50%, transparent 50%);
  background-position: calc(100% - 14px) 14px, calc(100% - 9px) 14px; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
}
.select-mini:focus { border-color: var(--brass-2); }

/* ============ 表格 ============ */
.table-wrap { width: 100%; overflow-x: auto; }
.rt-table { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 760px; }
.rt-table thead th {
  text-align: left; padding: 11px 12px;
  font-size: 10.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-3); background: rgba(246, 241, 231, .6);
  border-bottom: 1px solid var(--line); white-space: nowrap;
  position: sticky; top: 0; z-index: 2;
}
.rt-table thead th:first-child { border-top-left-radius: 8px; }
.rt-table thead th:last-child { border-top-right-radius: 8px; }
.rt-table tbody td { padding: 13px 12px; border-bottom: 1px dashed var(--line); vertical-align: middle; font-size: 12.8px; color: var(--text); }
.rt-table tbody tr { transition: background .15s; }
.rt-table tbody tr:hover { background: rgba(181, 129, 60, .045); }
.rt-table tbody tr:last-child td { border-bottom: none; }
.rt-table .num { font-family: var(--font-mono); font-size: 12px; letter-spacing: -.01em; }
.rt-table .sub { display: block; font-size: 10.5px; color: var(--text-3); margin-top: 2px; }
.rt-table .actions { display: flex; gap: 4px; justify-content: flex-end; }
.rt-table .ta-right { text-align: right; }
.rt-table .ta-center { text-align: center; }
.link-name { color: var(--ink); font-weight: 600; font-size: 13px; border-bottom: 1px solid transparent; transition: .15s; }
.link-name:hover { color: var(--brass); border-bottom-color: rgba(181, 129, 60, .45); }
.cell-icon { display: flex; align-items: center; gap: 10px; }
.cell-avatar {
  width: 32px; height: 32px; border-radius: 8px; flex: 0 0 auto;
  display: grid; place-items: center;
  background: linear-gradient(150deg, #efe6d4, #e2d4bb);
  color: #7d6336; font-family: var(--font-display); font-size: 13px;
  border: 1px solid rgba(181, 129, 60, .16);
}
.cell-avatar.green { background: linear-gradient(150deg, #dfece5, #c9dfd4); color: #2f6b5c; }
.cell-avatar.blue { background: linear-gradient(150deg, #e2eaf2, #cfdce9); color: #3c5a78; }
.cell-avatar.red { background: linear-gradient(150deg, #f4e2db, #ecd0c6); color: #a4513c; }
.table-note { padding: 10px 12px 0; font-size: 11px; color: var(--text-3); display: flex; justify-content: space-between; }
.empty { padding: 46px 20px; text-align: center; color: var(--text-3); }
.empty .ic { width: 34px; height: 34px; margin: 0 auto 10px; color: var(--line-strong); stroke-width: 1.3; }
.empty b { display: block; color: var(--text-2); font-size: 13px; margin-bottom: 4px; font-weight: 500; }
.empty p { font-size: 12px; }

/* 状态徽标 */
.pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 8px; border-radius: 99px;
  font-size: 10.8px; font-weight: 500; letter-spacing: .02em; white-space: nowrap;
  border: 1px solid transparent;
}
.pill::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .75; }
.pill.plain::before { display: none; }
.s-ok { color: var(--jade); background: var(--jade-2); border-color: rgba(47, 107, 92, .16); }
.s-warn { color: var(--amber); background: var(--amber-2); border-color: rgba(169, 118, 28, .18); }
.s-bad { color: var(--clay); background: var(--clay-2); border-color: rgba(177, 81, 58, .18); }
.s-info { color: var(--indigo); background: var(--indigo-2); border-color: rgba(60, 90, 120, .16); }
.s-muted { color: var(--text-3); background: #f1ece1; border-color: var(--line); }
.s-brass { color: #8a5f22; background: #f7ecd8; border-color: rgba(181, 129, 60, .2); }

.tag {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10.5px; color: var(--text-2); background: #f4efe3;
  border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px;
}
.chip {
  display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px;
  border-radius: 6px; background: rgba(255, 253, 248, .8); border: 1px solid var(--line);
  font-size: 11px; color: var(--text-2);
}
.chip .ic { width: 12px; height: 12px; }
.chip b { font-family: var(--font-mono); font-size: 11px; color: var(--ink); font-weight: 500; }

/* ============ 表单 ============ */
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-size: 11.5px; color: var(--text-2); letter-spacing: .03em; display: flex; gap: 4px; align-items: center; }
.field-label .req { color: var(--clay); }
.field-control { position: relative; display: flex; align-items: center; }
.field-control > .ic { position: absolute; left: 10px; width: 15px; height: 15px; color: var(--text-3); pointer-events: none; }
.field-control > .ic + input { padding-left: 33px; }
.field input, .field select, .field textarea, .form-input {
  width: 100%; height: 38px; padding: 0 11px;
  border: 1px solid var(--line-strong); border-radius: 8px;
  background: #fffdf8; outline: none;
  transition: border-color .16s, box-shadow .16s, background .16s;
  font-size: 13px;
}
.field textarea { height: auto; min-height: 78px; padding: 9px 11px; resize: vertical; line-height: 1.6; }
.field select {
  appearance: none; padding-right: 30px;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-3) 50%), linear-gradient(135deg, var(--text-3) 50%, transparent 50%);
  background-position: calc(100% - 15px) 16px, calc(100% - 10px) 16px;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
}
.field input:focus, .field select:focus, .field textarea:focus, .form-input:focus {
  border-color: var(--brass-2); box-shadow: 0 0 0 3px rgba(181, 129, 60, .1); background: #fffefa;
}
.field input:disabled, .field select:disabled, .field textarea:disabled { background: #f4efe4; color: var(--text-3); }
.field-hint { font-size: 10.5px; color: var(--text-3); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.span-2 { grid-column: span 2; }
.switch { position: relative; width: 38px; height: 21px; flex: 0 0 auto; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch span { position: absolute; inset: 0; background: #ddd5c4; border-radius: 99px; transition: .2s; }
.switch span::after { content: ""; position: absolute; width: 15px; height: 15px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--jade); }
.switch input:checked + span::after { transform: translateX(17px); }
.check { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--text-2); cursor: pointer; }
.check input { accent-color: var(--brass); width: 14px; height: 14px; }

/* ============ 标签页 ============ */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tab {
  position: relative; border: none; background: none; padding: 9px 14px 11px;
  font-size: 12.5px; color: var(--text-2); white-space: nowrap; transition: .16s;
}
.tab:hover { color: var(--ink); }
.tab.active { color: var(--ink); font-weight: 600; }
.tab.active::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; background: linear-gradient(90deg, var(--brass-2), var(--brass)); border-radius: 2px; }
.tab .count { font-family: var(--font-mono); font-size: 10px; color: var(--text-3); margin-left: 4px; }
.tab-pane { display: none; }
.tab-pane.active { display: block; animation: fadeUp .22s ease; }

/* ============ 详情排版 ============ */
.detail-hero {
  display: flex; align-items: flex-start; gap: 16px;
  padding: 18px 20px; border-radius: 10px;
  background: linear-gradient(135deg, rgba(181,129,60,.09), rgba(47,107,92,.04));
  border: 1px solid var(--line);
  margin-bottom: 16px;
}
.detail-hero .dh-mark {
  width: 46px; height: 46px; border-radius: 11px; flex: 0 0 auto;
  display: grid; place-items: center;
  background: linear-gradient(150deg, #2b333b, #171c21); color: var(--brass-2);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12);
}
.detail-hero h3 { font-family: var(--font-display); font-size: 19px; letter-spacing: .01em; }
.detail-hero .dh-meta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 5px; font-size: 11px; color: var(--text-3); }
.detail-hero .dh-meta span { display: inline-flex; gap: 4px; align-items: center; }
.detail-hero .dh-meta .ic { width: 12px; height: 12px; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; }
.detail-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.detail-row { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 12.5px; }
.detail-row .dr-label { color: var(--text-3); width: 92px; flex: 0 0 auto; font-size: 11.5px; }
.detail-row .dr-value { color: var(--text); min-width: 0; word-break: break-word; }
.detail-section { margin-top: 18px; }
.detail-section > h4 { font-size: 12px; letter-spacing: .08em; color: var(--text-3); text-transform: uppercase; margin-bottom: 8px; display: flex; align-items: center; gap: 7px; }
.detail-section > h4::after { content: ""; flex: 1; height: 1px; background: repeating-linear-gradient(90deg, var(--line-strong) 0 4px, transparent 4px 8px); }
.note-box { padding: 12px 14px; border-left: 2px solid var(--brass-2); background: rgba(181, 129, 60, .06); border-radius: 0 8px 8px 0; font-size: 12.5px; color: var(--text-2); line-height: 1.75; }
.share-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-top: 14px; margin-top: 16px; border-top: 1px dashed var(--line); }
.share-row .sr-label { font-size: 11px; color: var(--text-3); margin-right: 2px; }
.share-btn { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 9px; border-radius: 6px; border: 1px solid var(--line); background: #fffdf8; font-size: 11px; color: var(--text-2); transition: .15s; }
.share-btn:hover { border-color: var(--brass-2); color: var(--brass); background: rgba(181, 129, 60, .05); }
.share-btn .ic { width: 13px; height: 13px; }

/* ============ 时间线 ============ */
.timeline { position: relative; padding-left: 20px; }
.timeline::before { content: ""; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 1px; background: repeating-linear-gradient(180deg, var(--line-strong) 0 4px, transparent 4px 8px); }
.tl-item { position: relative; padding: 0 0 16px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before { content: ""; position: absolute; left: -19px; top: 5px; width: 9px; height: 9px; border-radius: 50%; background: var(--panel); border: 2px solid var(--line-strong); }
.tl-item.done::before { border-color: var(--jade); background: var(--jade); }
.tl-item.current::before { border-color: var(--brass); background: var(--brass-2); box-shadow: 0 0 0 4px rgba(181, 129, 60, .14); }
.tl-item.reject::before { border-color: var(--clay); background: var(--clay); }
.tl-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tl-title { font-size: 12.5px; font-weight: 600; color: var(--text); }
.tl-meta { font-size: 10.5px; color: var(--text-3); margin-top: 2px; }
.tl-body { margin-top: 5px; font-size: 11.5px; color: var(--text-2); line-height: 1.65; }

/* ============ 图表 ============ */
.chart-box { width: 100%; }
.chart-box svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 11px; color: var(--text-3); }
.chart-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 5px; }
.axis-text { font-family: var(--font-ui); font-size: 9.5px; fill: #948c7d; }
.chart-grid { stroke: #e9e1d2; stroke-width: 1; stroke-dasharray: 3 4; }
.chart-value { font-family: var(--font-mono); font-size: 9.5px; fill: #6d675c; }

/* ============ 弹窗（层叠） ============ */
.modal-layer {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 28px;
  background: rgba(16, 20, 24, .48);
  backdrop-filter: blur(5px) saturate(.9);
  opacity: 0; transition: opacity .22s ease;
}
.modal-layer.show { opacity: 1; }
.modal-layer.nested { background: rgba(16, 20, 24, .3); backdrop-filter: blur(3px); }
.rt-modal {
  width: 640px; max-width: 100%;
  max-height: calc(100vh - 56px);
  display: flex; flex-direction: column;
  background: var(--panel);
  border-radius: 15px;
  border: 1px solid rgba(181, 129, 60, .26);
  box-shadow: var(--shadow-modal);
  transform: translateY(14px) scale(.975);
  opacity: 0;
  transition: transform .26s cubic-bezier(.22,.8,.3,1), opacity .2s;
  position: relative;
  overflow: hidden;
}
.rt-modal::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--brass-2) 22%, var(--brass) 55%, transparent);
  opacity: .85; z-index: 3;
}
.modal-layer.show .rt-modal { transform: none; opacity: 1; }
.modal-layer.nested .rt-modal { transform: translate(16px, -12px) scale(.995); box-shadow: 0 60px 120px -40px rgba(10,14,18,.7); }
.modal-layer.nested.show .rt-modal { transform: translate(16px, -12px); }
.rt-modal.size-sm { width: 460px; }
.rt-modal.size-md { width: 640px; }
.rt-modal.size-lg { width: 820px; }
.rt-modal.size-xl { width: 980px; }
.rt-modal.size-full { width: 1180px; }
.modal-head {
  padding: 20px 24px 14px; display: flex; align-items: flex-start; gap: 12px;
  border-bottom: 1px dashed var(--line); flex: 0 0 auto;
}
.modal-head .mh-mark {
  width: 34px; height: 34px; border-radius: 8px; flex: 0 0 auto;
  display: grid; place-items: center;
  background: rgba(181, 129, 60, .1); color: var(--brass);
  border: 1px solid rgba(181, 129, 60, .18);
}
.modal-head .mh-mark .ic { width: 17px; height: 17px; }
.mh-copy { min-width: 0; flex: 1; }
.mh-eyebrow { font-size: 9.5px; letter-spacing: .18em; color: var(--brass); text-transform: uppercase; margin-bottom: 3px; }
.mh-title { font-family: var(--font-display); font-size: 19px; line-height: 1.3; color: var(--ink); letter-spacing: .01em; }
.mh-sub { font-size: 11px; color: var(--text-3); margin-top: 3px; }
.modal-close {
  width: 30px; height: 30px; border-radius: 7px; border: 1px solid transparent; background: transparent;
  color: var(--text-3); display: grid; place-items: center; flex: 0 0 auto; transition: .15s;
}
.modal-close:hover { background: rgba(177, 81, 58, .08); color: var(--clay); }
.modal-body { padding: 20px 24px; overflow-y: auto; flex: 1 1 auto; }
.modal-body.flush { padding: 0; }
.modal-foot {
  padding: 14px 24px 18px; display: flex; align-items: center; justify-content: flex-end; gap: 9px;
  border-top: 1px dashed var(--line); background: linear-gradient(180deg, transparent, rgba(246,241,231,.55)); flex: 0 0 auto;
}
.modal-foot .mf-left { margin-right: auto; font-size: 11px; color: var(--text-3); }
.modal-form { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.modal-form .span-2 { grid-column: span 2; }
.modal-stack-hint {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%);
  font-size: 10px; color: rgba(255,255,255,.6); letter-spacing: .1em; pointer-events: none;
}

/* 抽屉 */
.drawer-layer { position: fixed; inset: 0; z-index: 1000; background: rgba(16,20,24,.42); backdrop-filter: blur(4px); opacity: 0; transition: .22s; }
.drawer-layer.show { opacity: 1; }
.rt-drawer {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(560px, 94vw);
  background: var(--panel); border-left: 1px solid rgba(181,129,60,.25);
  box-shadow: -30px 0 80px -30px rgba(10,14,18,.6);
  display: flex; flex-direction: column;
  transform: translateX(40px); opacity: .6; transition: .28s cubic-bezier(.22,.8,.3,1);
}
.drawer-layer.show .rt-drawer { transform: none; opacity: 1; }

/* ============ Toast ============ */
.toast-layer { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 3000; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  min-width: 220px; max-width: 460px;
  padding: 10px 18px; border-radius: 9px;
  background: rgba(23, 28, 33, .94); color: #f3ecdd;
  font-size: 12.5px; letter-spacing: .02em;
  box-shadow: 0 18px 40px -18px rgba(0,0,0,.6);
  border: 1px solid rgba(255,255,255,.08);
  opacity: 0; transform: translateY(-8px); transition: .24s ease;
  display: flex; align-items: center; gap: 8px;
}
.toast.show { opacity: 1; transform: none; }
.toast-success { border-color: rgba(87, 160, 132, .35); }
.toast-success::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #6fbf9c; box-shadow: 0 0 8px #6fbf9c; }
.toast-error { border-color: rgba(200, 110, 90, .4); }
.toast-error::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #e39078; box-shadow: 0 0 8px #e39078; }

/* ============ 分页 ============ */
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 6px; padding: 14px 2px 2px; font-size: 11.5px; color: var(--text-3); }
.pager .pg-info { margin-right: auto; font-family: var(--font-mono); font-size: 10.5px; }
.pager button {
  min-width: 28px; height: 28px; border-radius: 6px; border: 1px solid var(--line);
  background: #fffdf8; color: var(--text-2); font-size: 11.5px; padding: 0 7px;
}
.pager button:hover { border-color: var(--brass-2); color: var(--brass); }
.pager button.active { background: var(--ink); border-color: var(--ink); color: #f5eddd; }
.pager button:disabled { opacity: .45; cursor: not-allowed; }

/* ============ 加载 ============ */
.skeleton { position: relative; overflow: hidden; background: #ece5d8; border-radius: 6px; }
.skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent); animation: shimmer 1.4s infinite; }
.page-loading { padding: 30px 4px; }
.sk-head { width: 280px; height: 26px; margin-bottom: 10px; }
.sk-sub { width: 460px; height: 13px; margin-bottom: 26px; }
.sk-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.sk-card { height: 96px; border-radius: 12px; }
.sk-block { height: 260px; border-radius: 12px; }
.spinner { width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
.btn.loading .spinner { margin-right: 4px; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { to { transform: translateX(100%); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.fade-up { animation: fadeUp .3s ease; }

/* 参数读数 */
.param {
  font-family: var(--font-mono); font-size: 12px; color: var(--ink);
  background: rgba(47, 107, 92, .07); border: 1px solid rgba(47, 107, 92, .14);
  padding: 1px 6px; border-radius: 4px; white-space: nowrap;
}
.param.warn { color: var(--amber); background: var(--amber-2); border-color: rgba(169,118,28,.2); }
.param.bad { color: var(--clay); background: var(--clay-2); border-color: rgba(177,81,58,.2); }
.mono { font-family: var(--font-mono); }
.muted { color: var(--text-3); }
.text-right { text-align: right; }
.text-center { text-align: center; }
.flex { display: flex; }
.items-center { align-items: center; }
.gap-6 { gap: 6px; }
.gap-10 { gap: 10px; }
.mt-10 { margin-top: 10px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.w-full { width: 100%; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; }

/* 响应式 */
@media (max-width: 1280px) {
  .kpi-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 1080px) {
  :root { --sidebar-w: 248px; }
  .tb-user-meta { display: none; }
  .tb-search { width: 220px; }
  .main-wrap { padding: 20px 18px 10px; }
}
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); transition: transform .28s cubic-bezier(.22,.8,.3,1); }
  body.nav-open .sidebar { transform: none; }
  .app-body { margin-left: 0; }
  .tb-toggle { display: grid; }
  .main-wrap { padding: 16px 14px 8px; }
  .page-title { font-size: 23px; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .detail-grid, .detail-grid.cols-3 { grid-template-columns: 1fr; }
  .modal-form { grid-template-columns: 1fr; }
  .modal-form .span-2 { grid-column: span 1; }
  .tb-search { display: none; }
  .sidebar-mask { position: fixed; inset: 0; background: rgba(16,20,24,.4); z-index: 35; opacity: 0; pointer-events: none; transition: .2s; }
  body.nav-open .sidebar-mask { opacity: 1; pointer-events: auto; }
}
@media (max-width: 620px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .page-head { flex-direction: column; align-items: stretch; }
  .page-head-side { justify-content: flex-start; }
  .modal-layer { padding: 12px; }
  .pager { justify-content: center; flex-wrap: wrap; }
}
