/* ===== SRM 复刻版 · 样式 ===== */
:root {
  --brand: #e0121f;
  --primary: #2f6bff;
  --primary-hover: #1a55ee;
  --primary-soft: #eef3ff;
  --bg: #eef1f7;
  --shell: #f7f9fc;
  --panel: #ffffff;
  --line: #e9edf5;
  --line-strong: #dfe5f0;
  --text: #2c3345;
  --text-2: #5a6274;
  --text-3: #9aa3b5;
  --head: #f5f7fb;
  --hover: #f6f8fd;
  --success: #12b981;
  --warn: #f0a020;
  --danger: #f04a4a;
  --purple: #7d5cff;
  --radius: 8px;
  --shadow-card: 0 1px 3px rgba(23, 43, 77, .06), 0 8px 24px -12px rgba(23, 43, 77, .12);
  --shadow-pop: 0 6px 24px rgba(23, 43, 77, .14);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
}

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--shell);
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
svg { display: block; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #ccd4e3; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #b2bccf; }
::-webkit-scrollbar-track { background: transparent; }

/* ===== 布局 ===== */
.app { display: flex; flex-direction: column; height: 100vh; }

/* 顶栏 */
.topbar {
  height: 72px;
  flex: 0 0 72px;
  display: flex;
  align-items: center;
  padding: 0 24px 0 20px;
  background: var(--shell);
  position: relative;
  z-index: 30;
}

.brand { display: flex; align-items: center; gap: 10px; width: 218px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  background: radial-gradient(circle at 30% 25%, #ff5a4d, var(--brand) 62%, #a8000c);
  box-shadow: 0 4px 12px rgba(224, 18, 31, .28);
  flex: 0 0 34px;
}
.brand-name { font-size: 21px; font-weight: 700; letter-spacing: .5px; color: #1c2233; }

.topnav { display: flex; align-items: center; gap: 42px; margin-left: 44px; }
.topnav a {
  font-size: 16px; color: #4a5164; padding: 6px 2px; position: relative;
  transition: color .18s;
}
.topnav a:hover { color: var(--text); }
.topnav a.active { color: #1c2233; font-weight: 600; }
.topnav a.active::after {
  content: ""; position: absolute; left: 50%; bottom: -14px; transform: translateX(-50%);
  width: 24px; height: 3px; border-radius: 3px; background: var(--primary);
}

.top-right { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.ver-chip {
  padding: 3px 9px; border-radius: 20px; margin-right: 4px;
  background: rgba(47, 107, 255, .08); color: #64748b;
  font-size: 11.5px; font-weight: 600; letter-spacing: .3px;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.icon-btn {
  width: 36px; height: 36px; border-radius: 8px; display: grid; place-items: center;
  color: #4a5164; position: relative; transition: background .16s, color .16s;
}
.icon-btn:hover { background: rgba(47, 107, 255, .08); color: var(--primary); }
.badge-dot {
  position: absolute; top: 1px; right: 0;
  min-width: 16px; height: 16px; padding: 0 4px; border-radius: 9px;
  background: var(--danger); color: #fff; font-size: 10px; line-height: 16px;
  text-align: center; font-weight: 600; box-shadow: 0 0 0 2px var(--shell);
}
.company-btn {
  display: flex; align-items: center; gap: 6px; margin-left: 8px;
  padding: 6px 10px; border-radius: 8px; color: #2c3345; font-size: 14px;
  transition: background .16s;
}
.company-btn:hover { background: rgba(47, 107, 255, .07); }
.company-btn .caret { color: #9aa3b5; }
.apps-btn { color: var(--primary); }

/* 弹出层 */
.popover {
  position: absolute; top: 62px; right: 20px; min-width: 200px;
  background: #fff; border-radius: 10px; box-shadow: var(--shadow-pop);
  border: 1px solid var(--line); padding: 6px; z-index: 90;
  animation: pop .16s ease-out;
}
@keyframes pop { from { opacity: 0; transform: translateY(-6px); } }
.popover .pi {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 7px;
  font-size: 14px; color: var(--text-2); cursor: pointer;
}
.popover .pi:hover { background: var(--primary-soft); color: var(--primary); }
.popover .pi.danger:hover { background: #fff1f1; color: var(--danger); }
.popover .psep { height: 1px; background: var(--line); margin: 5px 4px; }

/* 侧边栏 */
.body-wrap { flex: 1; display: flex; min-height: 0; }

.sidebar {
  width: 218px; flex: 0 0 218px; background: var(--shell);
  padding: 8px 10px 16px 14px; overflow-y: auto; overflow-x: hidden;
  transition: width .2s, flex-basis .2s;
}
.sidebar::-webkit-scrollbar { width: 6px; }

/* ===== 一级菜单：图标 + 粗体大字 ===== */
.menu-group > .mhead {
  display: flex; align-items: center; gap: 12px; height: 48px; padding: 0 6px 0 8px;
  border-radius: 8px; color: #1c2233; font-size: 15px; font-weight: 600;
  cursor: pointer; user-select: none; margin-bottom: 1px;
  transition: background .16s, color .16s;
}
.menu-group > .mhead:hover { background: rgba(47, 107, 255, .06); }
.menu-group > .mhead .mi { color: #5b6479; flex: 0 0 18px; display: flex; transition: color .16s; }
.menu-group.open > .mhead .mi { color: var(--primary); }
.menu-group > .mhead .mtext { flex: 1; white-space: nowrap; letter-spacing: .2px; }
.menu-group > .mhead .mcaret { color: #b7bfce; transition: transform .2s; }
.menu-group.open > .mhead .mcaret { transform: rotate(180deg); }

/* ===== 折叠容器：0fr → 1fr，高度过渡，三层统一 ===== */
.msub {
  display: grid; grid-template-rows: 0fr; padding: 0;
  transition: grid-template-rows .26s cubic-bezier(.4, 0, .2, 1), padding .26s ease;
}
.menu-group.open > .msub { grid-template-rows: 1fr; padding: 2px 0 8px; }
.msub-inner { overflow: hidden; min-height: 0; }

/* ===== 通用菜单行 ===== */
.msub-item {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  border-radius: 8px; cursor: pointer; white-space: nowrap; position: relative;
  padding: 9px 8px 9px 40px;
  font-size: 13.5px; font-weight: 500; color: #46506a;
  transition: color .16s, background .16s;
}
.msub-item:hover { color: var(--primary); background: #f4f7fd; }
.msub-item .mcaret { color: #b7bfce; transition: transform .28s cubic-bezier(.4, 0, .2, 1); }

/* ===== 二级：直接挂在一级下的叶子 ===== */
.msub-inner > .msub-item[data-page] { font-weight: 400; color: #4f5870; }

/* ===== 菜单内小节分隔（不是一级分组，只是同一组里的说明线） ===== */
.msub-sep {
  margin: 7px 8px 3px 40px; padding-top: 9px;
  border-top: 1px solid #eef1f7;
  font-size: 11px; font-weight: 500; letter-spacing: .08em;
  color: #9aa3b6; white-space: nowrap; user-select: none;
}

/* ===== 三级：分组里的叶子，缩进更深、字更小更浅 ===== */
.msub-child {
  display: grid; grid-template-rows: 0fr; position: relative;
  transition: grid-template-rows .24s cubic-bezier(.4, 0, .2, 1);
}
.msub-child.open { grid-template-rows: 1fr; }
.msub-child-inner { overflow: hidden; min-height: 0; }
.msub-child::before {
  content: ""; position: absolute; left: 54px; top: 2px; bottom: 10px; width: 1px;
  background: #eaeef6; border-radius: 1px;
}
.msub-child-inner > .msub-item {
  padding: 8px 8px 8px 66px;
  font-size: 13px; font-weight: 400; color: #6b7488;
}

/* ===== 选中态 ===== */
.msub-item[data-page].active {
  color: var(--primary); font-weight: 600; background: var(--primary-soft);
}
.msub-item[data-page].active:hover { background: #e6eeff; }
.msub-item[data-page].active::before {
  content: ""; position: absolute; left: 2px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 15px; border-radius: 3px; background: var(--primary);
}

/* ===== 箭头翻转：一/二/三级统一 ===== */
.menu-group.open > .mhead .mcaret,
.msub-item.open .mcaret { transform: rotate(180deg); }

/* 侧栏收起 */
.app.collapsed .sidebar { width: 62px; flex-basis: 62px; }
.app.collapsed .mtext, .app.collapsed .mcaret,
.app.collapsed .msub, .app.collapsed .brand-name { display: none; }
.app.collapsed .brand { width: auto; }
.app.collapsed .menu-group > .mhead { justify-content: center; padding: 0; }

/* 主内容 */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: 0 16px 0 0; }

.tabbar {
  height: 40px; flex: 0 0 40px; display: flex; align-items: flex-end; gap: 4px;
  padding-left: 8px; overflow-x: auto; overflow-y: hidden;
}
.tabbar::-webkit-scrollbar { height: 0; }
.tab {
  display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px;
  border-radius: 10px 10px 0 0; font-size: 14px; color: #6b7385; white-space: nowrap;
  cursor: pointer; transition: background .15s, color .15s;
}
.tab:hover { background: rgba(255, 255, 255, .7); color: var(--text); }
.tab.active {
  background: #fff; color: #1c2233; font-weight: 600;
  box-shadow: 0 -2px 8px rgba(23, 43, 77, .05);
}
.tab .tclose {
  width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center;
  color: #a8b0c0; font-size: 13px; line-height: 1;
}
.tab .tclose:hover { background: #e8ecf5; color: var(--text); }

.content {
  flex: 1; min-height: 0; background: var(--panel);
  border-radius: 12px 12px 0 0; box-shadow: var(--shadow-card);
  display: flex; flex-direction: column; overflow: hidden; position: relative;
}

/* ===== 列表页 ===== */
.page { flex: 1; min-height: 0; display: flex; flex-direction: column; animation: pageIn .15s ease-out; }
@keyframes pageIn { from { opacity: 0; transform: translate3d(0, 3px, 0); } }

.toolbar {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 20px 10px; flex: 0 0 auto;
}
.btn {
  height: 34px; padding: 0 16px; border-radius: 6px; border: 1px solid var(--line-strong);
  background: #fff; color: var(--text-2); font-size: 13.5px;
  display: inline-flex; align-items: center; gap: 6px;
  transition: all .16s;
}
.btn:hover { border-color: #b9c8e8; color: var(--primary); background: #fbfcff; }
.btn:disabled { color: #c2c9d6; border-color: #eaedf4; background: #fafbfd; cursor: not-allowed; }
.btn:disabled:hover { color: #c2c9d6; border-color: #eaedf4; background: #fafbfd; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: #fff; }
.btn.sm { height: 30px; padding: 0 12px; font-size: 13px; }
.btn .caret { color: currentColor; opacity: .7; }

.filters { padding: 2px 20px 12px; flex: 0 0 auto; }
.filters .frow {
  display: flex; align-items: flex-start; gap: 12px 22px; flex-wrap: nowrap;
}
.fset { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; }
.fitem { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.fitem > label { font-size: 14px; color: var(--text-2); white-space: nowrap; }
.fitem > label::after { content: ""; }
.finput, .fselect {
  height: 34px; width: 164px; padding: 0 11px; border-radius: 6px;
  border: 1px solid var(--line-strong); background: #fff; font-size: 14px; color: var(--text);
  outline: none; transition: border-color .16s, box-shadow .16s;
}
.finput::placeholder { color: #b6bdcb; }
.finput:focus, .fselect:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(47, 107, 255, .1); }
.fselect { appearance: none; cursor: pointer; width: 158px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path d='M1 1l4 4 4-4' fill='none' stroke='%239aa3b5' stroke-width='1.4' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat; background-position: right 11px center; padding-right: 28px; }

.factions { display: flex; align-items: center; gap: 10px; margin-left: auto; flex: 0 0 auto; }
.link-toggle {
  display: inline-flex; align-items: center; gap: 4px; color: var(--primary);
  font-size: 14px; padding: 4px 2px;
}
.link-toggle .caret { transition: transform .2s; }
.link-toggle.open .caret { transform: rotate(180deg); }

/* 表格 */
.table-wrap { flex: 1; min-height: 0; overflow: auto; padding: 0 20px; }
table.grid { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
table.grid th {
  position: sticky; top: 0; z-index: 2; background: var(--head);
  color: #2c3345; font-weight: 600; font-size: 13.5px; text-align: left;
  padding: 12px 12px; white-space: nowrap; border-bottom: 1px solid var(--line);
}
table.grid th.sorted { color: var(--primary); }
table.grid th .sort { display: inline-flex; flex-direction: column; gap: 2px; margin-left: 5px; vertical-align: middle; }
table.grid th .sort i {
  width: 0; height: 0; border-left: 3.5px solid transparent; border-right: 3.5px solid transparent;
  display: block; opacity: .45;
}
table.grid th .sort i.up { border-bottom: 5px solid currentColor; }
table.grid th .sort i.down { border-top: 5px solid currentColor; }
table.grid td {
  padding: 13px 12px; border-bottom: 1px solid #f1f4f9; color: #414a5c;
  white-space: nowrap; vertical-align: middle;
}
table.grid tbody tr { transition: background .12s; }
table.grid tbody tr:hover td { background: var(--hover); }
table.grid tbody tr.selected td { background: #f2f6ff; }
table.grid td.c { text-align: center; }
table.grid th.c { text-align: center; }
.cell-link { color: var(--primary); cursor: pointer; font-weight: 500; }
.cell-link:hover { text-decoration: underline; }
.cell-muted { color: var(--text-3); }
.empty-row td { text-align: center; color: var(--text-3); padding: 60px 0 !important; }

/* 复选框 */
.cbx {
  width: 16px; height: 16px; border-radius: 3px; border: 1.5px solid #c8cfdd;
  display: inline-grid; place-items: center; background: #fff; cursor: pointer;
  transition: background .14s, border-color .14s; vertical-align: middle;
}
.cbx:hover { border-color: var(--primary); }
.cbx.on { background: var(--primary); border-color: var(--primary); }
.cbx.on::after {
  content: ""; width: 9px; height: 5px; border-left: 1.8px solid #fff;
  border-bottom: 1.8px solid #fff; transform: rotate(-45deg) translateY(-1px);
}
.cbx.part { background: var(--primary); border-color: var(--primary); position: relative; }
.cbx.part::after { content: ""; width: 8px; height: 2px; background: #fff; border-radius: 1px; }

/* 标签 */
.tag {
  display: inline-flex; align-items: center; height: 24px; padding: 0 9px;
  border-radius: 4px; font-size: 12.5px; font-weight: 500;
  background: #f2f4f9; color: #5a6274; border: 1px solid #e8ecf4; white-space: nowrap;
}
.tag.blue { background: #edf3ff; color: #2f6bff; border-color: #d8e4ff; }
.tag.green { background: #e9f9f1; color: #0f9d63; border-color: #cdf1e0; }
.tag.orange { background: #fff6e8; color: #d98413; border-color: #ffe6c4; }
.tag.red { background: #fdeeee; color: #e04545; border-color: #fbdada; }
.tag.purple { background: #f2eeff; color: #6b4df0; border-color: #e2daff; }
.tag.gray { background: #f3f5f9; color: #7b8397; border-color: #e7ebf3; }

/* 分页 */
.pagination {
  flex: 0 0 auto; display: flex; align-items: center; gap: 14px;
  padding: 12px 20px; border-top: 1px solid var(--line); color: var(--text-2);
  font-size: 13.5px; background: #fff;
}
.pagination .total { color: var(--text-2); }
.pg { display: flex; align-items: center; gap: 6px; }
.pg button {
  min-width: 28px; height: 28px; padding: 0 6px; border-radius: 6px;
  color: var(--text-2); font-size: 13.5px; display: grid; place-items: center;
}
.pg button:hover:not(:disabled) { background: var(--primary-soft); color: var(--primary); }
.pg button.cur { background: var(--primary); color: #fff; border-radius: 50%; width: 28px; }
.pg button:disabled { color: #cdd4e0; cursor: not-allowed; }
.pg-size {
  height: 30px; border: 1px solid var(--line-strong); border-radius: 6px;
  padding: 0 26px 0 10px; background: #fff; font-size: 13.5px; color: var(--text-2);
  appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path d='M1 1l4 4 4-4' fill='none' stroke='%239aa3b5' stroke-width='1.4' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat; background-position: right 9px center;
}
.pg-jump { display: flex; align-items: center; gap: 6px; color: var(--text-3); }
.pg-jump input {
  width: 48px; height: 30px; text-align: center; border: 1px solid var(--line-strong);
  border-radius: 6px; outline: none;
}
.pg-jump input:focus { border-color: var(--primary); }
.pagination .right { margin-left: auto; display: flex; align-items: center; gap: 14px; }

/* ===== 工作台 ===== */
.dash {
  flex: 1; min-height: 0; overflow-y: auto; padding: 18px 20px 26px;
  background: var(--shell);
}
.dash-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.82fr); gap: 16px; align-items: start; }
.dash-col { display: flex; flex-direction: column; gap: 16px; }

.card { background: #fff; border-radius: 10px; box-shadow: var(--shadow-card); border: 1px solid #f0f3f9; }

.user-card { padding: 26px 26px 30px; display: flex; gap: 22px; align-items: flex-start; position: relative; overflow: hidden; }
.user-card::after {
  content: ""; position: absolute; right: 26px; top: 26px; width: 190px; height: 120px;
  background: radial-gradient(circle at 60% 40%, rgba(47,107,255,.09), rgba(47,107,255,0) 70%);
  pointer-events: none;
}
.avatar-lg {
  width: 96px; height: 96px; border-radius: 50%; flex: 0 0 96px;
  background: linear-gradient(135deg, #d9dfe9, #c3cbd9);
  display: grid; place-items: center; color: #fff;
}
.user-meta h2 { margin: 6px 0 16px; font-size: 22px; font-weight: 700; line-height: 1.45; color: #1c2233; max-width: 340px; }
.user-meta .row { display: flex; align-items: center; gap: 14px; color: var(--text-2); font-size: 14px; flex-wrap: wrap; }
.user-meta .row .sep { color: #dfe4ee; }

.card-head { display: flex; align-items: center; padding: 16px 20px 10px; }
.card-head h3 { margin: 0; font-size: 16px; font-weight: 600; color: #1c2233; }
.card-head .more { margin-left: auto; color: #a9b1c1; width: 26px; height: 26px; border-radius: 6px; display: grid; place-items: center; }
.card-head .more:hover { background: #f3f6fc; color: var(--text-2); }
.card-body { padding: 4px 20px 16px; }

.flow-item { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px dashed #f0f3f9; }
.flow-item:last-child { border-bottom: none; }
.flow-av { width: 40px; height: 40px; border-radius: 50%; background: #eef1f6; flex: 0 0 40px; display: grid; place-items: center; color: #b8c0ce; }
.flow-main { flex: 1; min-width: 0; }
.flow-title { font-size: 14px; color: #2c3345; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flow-sub { margin-top: 6px; display: flex; align-items: center; gap: 10px; color: var(--text-3); font-size: 12.5px; flex-wrap: nowrap; white-space: nowrap; }
.flow-sub > span:first-child { flex: 0 0 auto; }
.flow-sub .who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 200px; }
.flow-tags { display: flex; align-items: center; gap: 8px; }
.ribbon {
  writing-mode: vertical-rl; letter-spacing: 2px; font-size: 12px; color: #fff;
  background: linear-gradient(180deg, #6f9bff, #2f6bff); border-radius: 4px; padding: 8px 4px;
  align-self: center;
}

.tabsline { display: flex; align-items: center; gap: 20px; padding: 2px 2px 12px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.tabsline::-webkit-scrollbar { height: 0; }
.tabsline button {
  font-size: 14px; color: var(--text-2); padding: 4px 0; position: relative; white-space: nowrap;
}
.tabsline button:hover { color: var(--primary); }
.tabsline button.on { color: var(--primary); font-weight: 600; }
.tabsline button.on::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px;
  background: var(--primary); border-radius: 2px;
}
.tabsline .nav-arrow { color: #a9b1c1; width: 20px; display: grid; place-items: center; }
.tabsline .nav-arrow:hover { color: var(--primary); }

.notice {
  display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 8px;
  background: #f5f7fc; cursor: pointer; transition: background .15s;
}
.notice:hover { background: #eef3ff; }
.notice .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); flex: 0 0 8px; }
.notice .ntext { flex: 1; font-size: 13.5px; color: #414a5c; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notice .ntime { font-size: 12.5px; color: var(--text-3); white-space: nowrap; }

.announce { display: flex; gap: 14px; align-items: flex-start; padding: 10px 0; }
.announce .aic {
  width: 40px; height: 40px; border-radius: 50%; background: #eef2ff; color: #6b8bff;
  display: grid; place-items: center; flex: 0 0 40px;
}
.announce .atitle { font-size: 14px; color: #2c3345; line-height: 1.5; }
.announce .asub { font-size: 12.5px; color: var(--text-3); margin-top: 4px; display: flex; gap: 12px; }
.announce .adate { margin-left: auto; font-size: 12.5px; color: var(--text-3); white-space: nowrap; }

.bignum {
  display: inline-block; min-width: 20px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--danger); color: #fff; font-size: 11px; line-height: 18px; text-align: center;
  vertical-align: 2px; margin-left: 4px;
}

/* ===== 供应商档案详情 ===== */
.detail-mask { position: absolute; inset: 0; background: #fff; z-index: 60; display: flex; flex-direction: column; }
.detail-top { flex: 0 0 auto; padding: 14px 20px; }
.detail-body { flex: 1; overflow-y: auto; padding: 8px 10px 60px; }
.detail-inner { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.detail-title { text-align: center; font-size: 22px; font-weight: 600; color: #1c2233; margin: 10px 0 22px; }

.sec { margin-bottom: 6px; }
.sec-head {
  display: flex; align-items: center; gap: 10px; padding: 12px 0; cursor: pointer;
  user-select: none; width: fit-content;
}
.sec-head .bar { width: 4px; height: 17px; border-radius: 2px; background: var(--primary); }
.sec-head h4 { margin: 0; font-size: 15.5px; font-weight: 600; color: #1c2233; }
.sec-head .arw {
  width: 18px; height: 18px; border-radius: 50%; background: #eef2ff; color: #6b8bff;
  display: grid; place-items: center; font-size: 10px; transition: transform .2s;
}
.sec.collapsed .arw { transform: rotate(-90deg); }
.sec-body { padding: 0 0 12px 14px; }
.sec.collapsed .sec-body { display: none; }

.form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 26px; }
.form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.fg-item label { display: block; font-size: 13.5px; color: #5a6274; margin-bottom: 7px; }
.fg-item .val {
  min-height: 38px; display: flex; align-items: center; padding: 7px 12px;
  background: #f7f9fc; border: 1px solid #eaeef6; border-radius: 6px;
  font-size: 14px; color: #2c3345; word-break: break-all; line-height: 1.5;
}
.fg-item .val.sel {
  background: #f7f9fc; justify-content: space-between; color: #2c3345;
}
.fg-item .val.sel .caret { color: #b6bdcb; }
.fg-item .hint { font-size: 12.5px; color: #9aa3b5; margin-top: 6px; }

.subtable { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.subtable th { background: var(--head); color: #2c3345; font-weight: 600; text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.subtable td { padding: 10px 12px; border-bottom: 1px solid #f1f4f9; color: #414a5c; }

.empty-block { padding: 26px 0; text-align: center; color: var(--text-3); font-size: 13.5px; }

/* ===== 登录 ===== */
.login {
  position: fixed; inset: 0; z-index: 500; display: flex; background: #fff;
}
.login.hide { display: none; }

.login-hero {
  flex: 1; min-width: 0; position: relative; overflow: hidden;
  background: linear-gradient(135deg, #9fb4d8 0%, #b9c8e0 38%, #cfd9e8 70%, #dfe6f0 100%);
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 30px 40px 70px;
}
.login-hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(circle at 78% 18%, rgba(255,255,255,.55), transparent 42%),
    radial-gradient(circle at 12% 82%, rgba(120,150,200,.35), transparent 48%);
}
.login-hero::after {
  content: ""; position: absolute; left: -10%; bottom: -30%; width: 120%; height: 70%;
  background: linear-gradient(180deg, rgba(120,140,170,.35), rgba(70,90,120,.55));
  transform: skewY(-6deg);
}
.lh-grid {
  position: absolute; right: -60px; bottom: -40px; width: 520px; height: 520px;
  background-image:
    linear-gradient(rgba(255,255,255,.22) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.22) 1px, transparent 1px);
  background-size: 44px 44px;
  transform: rotate(-14deg); opacity: .5; pointer-events: none;
}
.lh-top { display: flex; align-items: center; gap: 10px; color: #23324a; font-size: 18px; font-weight: 600; position: relative; z-index: 2; }
.lh-copy { position: relative; z-index: 2; margin-bottom: auto; margin-top: 12vh; }
.lh-copy h1 {
  margin: 0 0 18px; font-size: 40px; line-height: 1.32; font-weight: 700; color: #1a2438;
  letter-spacing: 1px;
}
.lh-copy p { margin: 0; font-size: 14.5px; color: #3d4c63; letter-spacing: .5px; }

.login-panel {
  width: 520px; flex: 0 0 520px; display: flex; align-items: center; justify-content: center;
  padding: 0 40px; background: #fff;
}
.lp-inner { width: 100%; max-width: 350px; }
.lp-title { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 700; color: #1c2233; margin-bottom: 46px; }
.lp-inner h2 { margin: 0 0 26px; font-size: 22px; font-weight: 600; color: #1c2233; }

.lf { margin-bottom: 20px; }
.lf > label { display: block; font-size: 13.5px; color: #4a5164; margin-bottom: 8px; }
.lf input {
  width: 100%; height: 44px; padding: 0 14px; border: 1px solid #dfe4ee; border-radius: 6px;
  font-size: 14.5px; outline: none; background: #fbfcfe; transition: all .16s;
}
.lf input::placeholder { color: #b6bdcb; }
.lf input:focus { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 3px rgba(47,107,255,.1); }
.pw { position: relative; }
.pw input { padding-right: 44px; }
.pw .eye {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px; border-radius: 6px; display: grid; place-items: center; color: #a8b0c0;
}
.pw .eye:hover { color: var(--primary); background: #f2f6ff; }
.cap-row { display: flex; gap: 10px; }
.cap-row input { flex: 1; }
#capCanvas { width: 104px; height: 36px; margin-top: 4px; border-radius: 6px; border: 1px solid #e6ebf4; cursor: pointer; background: #fdfefe; }

.lf-row { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 24px; }
.chk { display: flex; align-items: center; gap: 7px; font-size: 13.5px; color: #4a5164; cursor: pointer; }
.chk input { width: 15px; height: 15px; accent-color: var(--primary); }
.forgot { font-size: 13.5px; color: var(--primary); }
.forgot:hover { text-decoration: underline; }

.login-btn {
  width: 100%; height: 44px; border-radius: 22px; background: var(--primary); color: #fff;
  font-size: 15px; font-weight: 500; letter-spacing: 2px; box-shadow: 0 8px 18px -6px rgba(47,107,255,.6);
  transition: all .18s;
}
.login-btn:hover { background: var(--primary-hover); transform: translateY(-1px); }
.login-err { min-height: 20px; margin-top: 12px; font-size: 13px; color: var(--danger); text-align: center; }
.login-foot { margin-top: 18px; font-size: 12.5px; color: #a2aab9; text-align: center; }

/* ===== 轻提示 ===== */
.toasts { position: fixed; top: 84px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  background: #fff; border: 1px solid #e9edf5; box-shadow: var(--shadow-pop);
  padding: 10px 18px; border-radius: 8px; font-size: 14px; color: #2c3345;
  display: flex; align-items: center; gap: 9px; animation: tin .2s ease-out;
}
@keyframes tin { from { opacity: 0; transform: translateY(-8px); } }
.toast .tic { width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 11px; }
.toast.ok .tic { background: var(--success); }
.toast.info .tic { background: var(--primary); }
.toast.err .tic { background: var(--danger); }

/* 狭窄屏 */
@media (max-width: 1180px) {
  .dash-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topnav { gap: 24px; margin-left: 24px; }
}
