:root {
  --ink: #172d3e;
  --muted: #7a8991;
  --line: #e1e9ec;
  --paper: #ffffff;
  --bg: #f2f6f7;
  --brand: #0f3976;
  --brand-deep: #0b2a4f;
  --amber: #b9781f;
  --danger: #b33a3a;
  --radius: 14px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", sans-serif;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }

.login-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background:
    radial-gradient(circle at 15% 15%, rgba(41, 134, 163,  .15), transparent 34%),
    radial-gradient(circle at 85% 90%, rgba(185, 120, 31, .12), transparent 30%),
    #eef5f6;
}
.login-card {
  width: 440px;
  max-width: 100%;
  padding: 34px;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(17, 47, 70,  .14);
  border: 1px solid rgba(217, 230, 235,  .9);
}
.login-brand { display: flex; align-items: center; gap: 14px; }
.login-brand + .login-form { margin-top: 30px; }
.logo-mark {
  width: 52px; height: 52px; border-radius: 15px;
  display: flex; align-items: center; justify-content: center;
  background: var(--brand); color: #fff; font-size: 24px; font-weight: 800;
  box-shadow: 0 10px 24px rgba(15, 57, 118,  .25);
}
.logo-mark.small { width: 38px; height: 38px; border-radius: 11px; font-size: 18px; }
.login-brand h1 { margin: 0; font-size: 22px; letter-spacing: .5px; }
.login-brand p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.login-tabs { display: flex; gap: 8px; margin: 28px 0 20px; padding: 4px; background: #f2f6f7; border-radius: 12px; }
.login-tab {
  flex: 1; border: 0; border-radius: 9px; padding: 9px;
  background: transparent; color: var(--muted); font-size: 14px;
}
.login-tab.active { background: #fff; color: var(--ink); font-weight: 700; box-shadow: 0 2px 7px rgba(20, 49, 70,  .09); }
.login-form { display: flex; flex-direction: column; gap: 15px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field span { color: #586973; font-size: 13px; }
.field input, .field select, .field textarea {
  width: 100%; border: 1px solid #d8e2e6; border-radius: 10px;
  padding: 11px 12px; color: var(--ink); background: #fbfdfd; outline: none;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: #477da9; box-shadow: 0 0 0 3px rgba(71, 125, 169,  .12); }
.primary-btn, .ghost-btn, .small-btn {
  border: 0; border-radius: 9px; padding: 10px 14px; font-weight: 650;
}
.primary-btn { background: var(--brand); color: #fff; }
.primary-btn:hover { background: #0b3065; }
.primary-btn:disabled { opacity: .6; cursor: wait; }
.ghost-btn { background: #eef3f5; color: #3f5665; }
.ghost-btn:hover { background: #e1e9ee; }
.ghost-btn.danger { color: #9b3f3a; background: #fff0ee; }
.small-btn { padding: 7px 10px; font-size: 12px; background: #edf3f5; color: #2d536e; }
.small-btn.danger { background: #fff0ee; color: var(--danger); }
.small-btn:hover { filter: brightness(.98); }
.ghost-btn.active-filter { background: #dce8ef; color: #0b315e; font-weight: 700; }
.login-submit { margin-top: 4px; width: 100%; padding: 12px; }
.error-text { min-height: 18px; margin: 0; color: var(--danger); font-size: 13px; }
.demo-tip { display: flex; flex-direction: column; gap: 5px; margin-top: 22px; padding: 13px 15px; border-radius: 10px; background: #f7fafb; border: 1px dashed #d6e3e8; color: #708087; font-size: 12px; line-height: 1.5; }
.demo-tip strong { color: #3f5665; }

.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 232px; flex-shrink: 0; background: #0c243f; color: #e9f3f7;
  padding: 22px 14px 18px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.sidebar-brand { display: flex; gap: 11px; align-items: center; padding: 2px 8px 22px; border-bottom: 1px solid rgba(194, 219, 232,  .16); }
.sidebar-brand strong { display: block; font-size: 14px; }
.sidebar-brand small { display: block; margin-top: 4px; color: #8da6b7; font-size: 11px; }
.side-nav { padding: 18px 0; display: flex; flex-direction: column; gap: 4px; overflow: auto; }
.nav-item {
  display: flex; align-items: center; gap: 10px; border: 0; background: transparent;
  color: #b5cad5; text-align: left; padding: 10px 12px; border-radius: 9px; font-size: 14px;
}
.nav-item:hover { background: rgba(184, 211, 225,  .08); color: #fff; }
.nav-item.active { background: #1b436a; color: #fff; font-weight: 650; }
.nav-icon { width: 23px; height: 23px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; background: rgba(255,255,255,.1); font-size: 11px; }
.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; padding-top: 16px; border-top: 1px solid rgba(194, 219, 232,  .16); }
.sidebar-version { padding: 0 10px 4px; color: #7e98a7; font-size: 11px; letter-spacing: .6px; }
.login-icp { display: block; margin: 14px auto 4px; text-align: center; color: #7e98a7; font-size: 12px; letter-spacing: .4px; text-decoration: none; }
.login-icp:hover { color: #0f3976; }
.sidebar-foot .ghost-btn { background: rgba(255,255,255,.07); color: #c9dae4; text-align: left; font-size: 12px; }
.sidebar-foot .danger { color: #f1c8c2; }
.main { flex: 1; min-width: 0; padding: 30px 34px 50px; }
.topbar { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 24px; position: relative; }
.page-actions { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; justify-content: flex-end; position: absolute; right: 0; bottom: -24px; transform: translateY(calc(-50% + 5px)); } /* 底边贴卡片顶线再上移半行高减 5px = 居中略偏下 */
.page-actions .primary-btn, .page-actions .ghost-btn { flex-shrink: 0; font-size: 12px; padding: 6px 11px; border-radius: 8px; }
.page-kicker { margin: 0 0 5px; color: #8b9aa3; font-size: 11px; letter-spacing: 2.5px; font-weight: 700; }
.topbar h1 { margin: 0; font-size: 25px; letter-spacing: .3px; }
.topbar-right { display: flex; align-items: center; gap: 10px; margin-left: 14px; }
.user-chip { padding: 7px 12px; border-radius: 999px; background: #e4eef2; color: #2d536e; font-size: 12px; }
.user-chip.clickable { cursor: pointer; transition: background .16s ease, color .16s ease; }
.user-chip.clickable:hover { background: #d3e4ec; color: #143a5c; }
.page-content { display: flex; flex-direction: column; gap: 18px; }
.loading-block { padding: 60px; text-align: center; color: #8d9aa3; }

.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 6px 22px rgba(26, 57, 78,  .035); }
.card-pad { padding: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 18px 20px; border-bottom: 1px solid #edf2f3; }
.card-title { margin: 0; font-size: 15px; }
.card-sub { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.metric { padding: 18px; }
.metric-label { color: var(--muted); font-size: 12px; }
.metric-value { display: block; margin-top: 8px; font-size: 30px; font-weight: 800; letter-spacing: -.5px; }
.metric-note { display: block; margin-top: 7px; color: #919da3; font-size: 11px; }
.metric.warn .metric-value { color: var(--amber); }
.metric.danger .metric-value { color: var(--danger); }
.two-col { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(300px, .8fr); gap: 18px; }
.three-col { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.quick-list { display: flex; flex-direction: column; }
.quick-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 20px; border-bottom: 1px solid #f0f4f5; }
.quick-row:last-child { border-bottom: 0; }
.quick-clickable { width: 100%; border: 0; background: transparent; font: inherit; color: inherit; text-align: left; cursor: pointer; transition: background .15s ease; }
.quick-clickable:hover { background: #f2f8f9; }
.quick-clickable:hover .quick-label { color: #2d536e; }
.quick-label { color: #5d6e77; font-size: 13px; }
.quick-value { font-size: 18px; font-weight: 750; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid #edf2f3; flex-wrap: wrap; }
.toolbar-left, .toolbar-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.search-input, .select-input { border: 1px solid #dbe4e8; border-radius: 8px; padding: 8px 10px; background: #fbfdfd; color: var(--ink); font-size: 13px; }
.role-select { padding: 4px 8px; font-size: 12px; min-width: 104px; }
.search-input { width: 240px; }
.table-wrap { overflow: auto; }
/* 台账类长表格：容器内纵向滚动 + 冻结首行 + 固定末列操作 */
.page-table { max-height: calc(100vh - 250px); }
.page-table th { position: sticky; top: 0; z-index: 3; box-shadow: inset 0 -1px 0 #edf2f3; }
.page-table th:last-child, .page-table td:last-child { position: sticky; right: 0; }
.page-table th:last-child { z-index: 4; background: #f8fafb; box-shadow: inset 0 -1px 0 #edf2f3, -10px 0 10px -8px rgba(23, 45, 62,  .3); }
.page-table td:last-child { background: #fff; box-shadow: -10px 0 10px -8px rgba(23, 45, 62,  .18); }
.page-table tbody tr:hover td:last-child { background: #fbfdfd; }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th { text-align: left; color: #828f96; font-size: 11px; font-weight: 600; letter-spacing: .3px; padding: 11px 14px; background: #f8fafb; border-bottom: 1px solid #edf2f3; white-space: nowrap; }
td { padding: 12px 14px; border-bottom: 1px solid #f1f4f5; font-size: 13px; color: #384a56; vertical-align: middle; white-space: nowrap; }
tbody tr:hover { background: #fbfdfd; }
td.strong { color: var(--ink); font-weight: 650; }
td.mono { font-family: Consolas, "SFMono-Regular", monospace; font-size: 12px; color: #393d7e; }
.table-empty { padding: 50px 20px; text-align: center; color: #8d9aa3; font-size: 13px; }
.badge { display: inline-flex; align-items: center; padding: 3px 8px; border-radius: 999px; font-size: 11px; white-space: nowrap; }
.badge.green { background: #e4f2f5; color: #1d5b7c; }
.badge.amber { background: #fff4dd; color: #9a6817; }
.badge.red { background: #ffebeb; color: #ad3f3a; }
.badge.blue { background: #eaf2ff; color: #38649a; }
.badge.gray { background: #eef0f2; color: #7c878f; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.page-toolbar { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; border-top: 1px solid #edf2f3; color: #8b99a0; font-size: 12px; }
.pager { display: flex; align-items: center; gap: 7px; }
.pager button { border: 1px solid #dce5e9; border-radius: 7px; background: #fff; color: #4f626e; padding: 6px 9px; font-size: 12px; }
.pager button:disabled { opacity: .4; }
.pager button.active { background: var(--brand); border-color: var(--brand); color: #fff; }

.modal-backdrop { position: fixed; inset: 0; background: rgba(9, 26, 41,  .45); display: flex; align-items: center; justify-content: center; padding: 24px; z-index: 50; }
.modal { width: 460px; max-width: 100%; max-height: min(86vh, 760px); background: #fff; border-radius: 18px; box-shadow: 0 30px 100px rgba(0, 0, 0, .25); overflow: hidden; display: flex; flex-direction: column; }
.modal-head { padding: 20px 22px 0; flex-shrink: 0; }
.modal-head h3 { margin: 0; font-size: 18px; }
.modal-head p { margin: 6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.modal-body { padding: 18px 22px; display: flex; flex-direction: column; gap: 13px; overflow-y: auto; min-height: 0; flex: 1; }
.modal-foot { padding: 0 22px 20px; display: flex; justify-content: flex-end; gap: 8px; flex-shrink: 0; }
.toast { position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%); padding: 10px 16px; border-radius: 9px; background: #172d3e; color: #fff; font-size: 13px; box-shadow: 0 10px 30px rgba(0,0,0,.18); z-index: 80; }
.muted { color: var(--muted); }
.tiny { font-size: 11px; }
/* 字段配置弹窗：提醒 / 自动填写 / 无需校准 之间的分隔线 */
.date-rule-sep {
  height: 1px;
  margin: 14px 0 12px;
  background: repeating-linear-gradient(90deg, var(--line) 0 6px, transparent 6px 12px);
}
.company-cell strong { display: block; }
.company-cell small { color: var(--muted); font-family: Consolas, monospace; font-size: 11px; }

@media (max-width: 1080px) {
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .two-col { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .sidebar { width: 76px; padding: 18px 8px; }
  .sidebar-brand div:last-child, .nav-item span:last-child, .sidebar-foot { display: none; }
  .sidebar-brand { justify-content: center; border-bottom: 0; padding-bottom: 12px; }
  .nav-item { justify-content: center; padding: 10px; }
  .main { padding: 20px 14px 40px; }
  .topbar { flex-wrap: wrap; }
  .topbar h1 { font-size: 21px; }
  .page-actions { position: static; order: 3; width: 100%; justify-content: flex-start; align-self: stretch; margin: 12px 0 0; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .three-col { grid-template-columns: 1fr; }
  .search-input { width: 100%; }
  .login-shell { padding: 16px; }
  .modal { max-height: 92vh; }
}

.import-drop {
  border: 1px dashed #b9cdd8;
  border-radius: 12px;
  padding: 18px;
  background: #f7fafb;
}
.import-drop input { width: 100%; color: #4b606d; font-size: 13px; }
.import-drop p { margin: 9px 0 0; color: #8a99a0; font-size: 12px; }
.import-result {
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.7;
}
.import-result.ok { background: #e9f4f7; color: #28526b; }
.import-result.warn { background: #fff7e8; color: #7a5b1d; }
.import-result strong { display: block; font-size: 14px; }
.import-result ul { margin: 8px 0 0; padding-left: 18px; max-height: 150px; overflow: auto; }
.import-result li { margin: 3px 0; }

.column-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid #e4eeef;
  border-radius: 9px;
  background: #fbfdfd;
  font-size: 13px;
  color: #3f5562;
}
.column-option input { accent-color: #0f3976; }
.column-option small { margin-left: auto; color: #939fa5; }
.column-option .col-check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.column-option .col-move { display: inline-flex; gap: 3px; margin-left: 8px; }
.column-option .col-move button {
  border: 1px solid #dbe5e9; background: #fff; color: #5b7280; cursor: pointer;
  width: 22px; height: 20px; line-height: 1; font-size: 9px; border-radius: 5px; padding: 0;
}
.column-option .col-move button:hover { color: #0f3976; border-color: #0f3976; background: #eef5f7; }

/* 设备资料弹窗 */
.doc-upload-row, .doc-zip-row { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.doc-upload-row select, .doc-upload-row input[type=file], .doc-zip-row input[type=file], .modal-body > input[type=file].input {
  padding: 8px 10px; border: 1px solid #d7e0e6; border-radius: 8px; background: #fff; color: #16324a; font-size: 13px;
}
.doc-group { margin-bottom: 16px; }
.doc-group-title { font-weight: 600; display: flex; gap: 6px; align-items: center; margin-bottom: 6px; }
.doc-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid #e3ecf1; border-radius: 8px; margin-bottom: 6px; background: #fbfdfd; }
.doc-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-list { max-height: 46vh; overflow-y: auto; }
.zip-result { padding: 10px 12px; border-radius: 8px; background: #eef5f7; border: 1px solid #d7e0e6; color: #16324a; }
.doc-row .small-btn { text-decoration: none; display: inline-flex; align-items: center; }

/* 字段配置：下拉选项行式编辑 */
.option-row { display: flex; align-items: center; gap: 5px; margin-bottom: 5px; }
.option-row .option-index { width: 18px; text-align: right; color: #939fa5; font-size: 12px; flex: none; }
.option-row .option-input {
  flex: 1; min-width: 0; height: 30px; padding: 0 8px;
  border: 1px solid #dbe3e7; border-radius: 6px; font-size: 13px;
}
.option-row .option-input:focus { outline: none; border-color: #0f3976; }
.option-row .option-btn {
  flex: none; border: 1px solid #dbe5e9; background: #fff; color: #5b7280; cursor: pointer;
  width: 24px; height: 24px; line-height: 1; border-radius: 5px; font-size: 10px; padding: 0;
}
.option-row .option-btn:hover { color: #0f3976; border-color: #0f3976; background: #eef5f7; }
.option-row .option-del:hover { color: #b3261e; border-color: #d9a09c; background: #fdf0ef; }
#option-batch {
  width: 100%; box-sizing: border-box; border: 1px solid #dbe3e7; border-radius: 6px;
  padding: 6px 8px; font-size: 13px; margin-bottom: 5px; font-family: inherit;
}

.metric-clickable { cursor: pointer; transition: transform .15s ease, box-shadow .15s ease; }
.metric-clickable:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(26, 57, 78,  .09); }
.link-btn {
  border: 0;
  padding: 0;
  background: transparent;
  color: #2d536e;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.link-btn:hover { text-decoration: underline; }
.filter-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.filter-row-label { font-size: 12px; color: #8a959c; font-weight: 600; margin-right: 2px; }
.tag-suggest-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 8px 0 4px; }
.filter-chip {
  border: 1px solid #dce5e9;
  border-radius: 999px;
  padding: 6px 11px;
  background: #fff;
  color: #6d7d85;
  font-size: 12px;
}
.filter-chip:hover { border-color: #9cbac8; color: #2d536e; }
.filter-chip.active { border-color: #0f3976; background: #e7f0f4; color: #0b315e; font-weight: 650; }

/* 动态快捷筛选标签栏：胶囊标签横向滚动，搜索框固定右侧，搜索与标签筛选叠加 */
.quick-filter-bar { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; flex-wrap: wrap; }
.qf-scroll { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 0; overflow-x: auto; padding: 2px; scrollbar-width: thin; }
.qf-scroll .filter-chip { flex-shrink: 0; white-space: nowrap; }
.qf-group-label { flex-shrink: 0; font-size: 12px; color: #8a959c; font-weight: 600; margin-left: 8px; }
.qf-group-label:first-child { margin-left: 2px; }
.quick-filter-bar .search-input { flex-shrink: 0; width: 220px; }

.modal-wide { width: 900px; }
.detail-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.detail-grid > div { padding: 10px 12px; background: #f7fafb; border-radius: 9px; color: #7d8c94; font-size: 11px; display: flex; flex-direction: column; gap: 4px; }
.detail-grid > div > *:last-child { color: #273f4e; font-size: 13px; }
.detail-note { padding: 10px 12px; border-radius: 9px; background: #f2f7f8; color: #61717a; font-size: 12px; }
.detail-table table { min-width: 720px; }
.detail-table th, .detail-table td { padding: 9px 10px; }
.detail-list { display: flex; flex-direction: column; border-top: 1px solid #edf2f3; }
.detail-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 10px 0; border-bottom: 1px solid #f0f4f5; font-size: 12px; }
.detail-row span { color: #829096; }
.detail-row strong { color: #2d414e; font-weight: 600; text-align: right; }
.mini-table { width: 100%; border-collapse: collapse; min-width: 0; margin-bottom: 8px; }
.mini-table th, .mini-table td { padding: 8px 10px; font-size: 12px; border-bottom: 1px solid #edf2f3; text-align: left; }
.mini-table th { color: #7d8c94; font-weight: 600; background: #f5f9fa; }
@media (max-width: 760px) {
  .modal-wide { width: 100%; }
  .detail-grid { grid-template-columns: 1fr 1fr; }
}

/* 公司维护：机构信息 + 管理员账号管理 */
.manage-block { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: #fbfdfd; }
.manage-title { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 650; color: var(--ink); margin-bottom: 12px; }
.manage-title > span { font-weight: 400; }
.manage-title > .small-btn { margin-left: auto; }
.manage-grid { display: grid; grid-template-columns: 1fr 200px; gap: 10px 12px; }
.manage-full { grid-column: 1 / -1; }
.manage-actions { display: flex; justify-content: flex-end; margin-top: 12px; }
.manage-block .table-wrap { margin-top: 4px; }
.inline-panel { border: 1px dashed #b9cdd8; border-radius: 10px; padding: 12px 14px; background: #f4f9fb; margin-top: 10px; }
.inline-panel.success { border-style: solid; border-color: #b7d8e0; background: #f0f9fa; }
.inline-panel p { margin: 0 0 8px; font-size: 12px; color: #415b6a; }
.inline-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.inline-row input { flex: 1 1 180px; min-width: 150px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; }
.password-reveal { padding: 8px 14px; border-radius: 8px; background: #172d3e; color: #eaf6fa; font-family: Consolas, monospace; font-size: 15px; letter-spacing: 1px; user-select: all; }
@media (max-width: 760px) {
  .manage-grid { grid-template-columns: 1fr; }
}

.guide-list { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.guide-step { display: flex; gap: 12px; align-items: flex-start; }
.guide-num { flex: 0 0 30px; height: 30px; border-radius: 9px; background: #e3eef2; color: #0f3a66; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; }
.guide-step strong { color: #253b49; font-size: 14px; }
.guide-step p { margin: 4px 0 0; color: #717f86; font-size: 13px; line-height: 1.7; }

/* 凭证图片上传与图集 */
.attachment-field > span { color: #586973; font-size: 13px; }
.attachment-tiles { display: flex; flex-wrap: wrap; gap: 8px; }
.attachment-tiles:empty { display: none; }
.attachment-tile { position: relative; width: 76px; height: 76px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: #f4f7f8; display: flex; align-items: center; justify-content: center; font-size: 11px; color: #8b9ba3; }
.attachment-tile img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.attachment-tile.uploading { border-style: dashed; }
.attachment-remove { position: absolute; top: 2px; right: 2px; width: 18px; height: 18px; border-radius: 50%; border: none; background: rgba(20, 33, 45,  .62); color: #fff; font-size: 12px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.attachment-remove:hover { background: rgba(160, 48, 40, .9); }
.attachment-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.attach-btn { display: inline-flex; align-items: center; cursor: pointer; }
.proof-block { margin-top: 4px; }
.proof-title { display: block; font-size: 12px; color: #586973; margin-bottom: 8px; }
.proof-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.proof-item { width: 92px; display: flex; flex-direction: column; gap: 4px; text-decoration: none; }
.proof-item img { width: 92px; height: 92px; object-fit: cover; border-radius: 9px; border: 1px solid var(--line); background: #f4f7f8; }
.proof-item small { font-size: 10px; color: #8b9ba3; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 系统设置页（审批设置 / 备份设置） */
.settings-card h3 { margin: 0 0 6px; font-size: 16px; }
.settings-card .field input, .settings-card .field select { max-width: 360px; }

/* 操作日志页 */
.active-tab { border-color: #0f3976; color: #0f3976; background: #eef4f7; font-weight: 600; }
.danger-text { color: #ad3f3a; font-weight: 600; }
.log-detail-cell { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ghost-btn[disabled] { opacity: .45; cursor: not-allowed; }

/* 台账表头筛选（Excel 式漏斗） */
.th-filterable { display: inline-flex; align-items: center; gap: 4px; }
.th-filter-btn {
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; background: transparent; color: #9dacb4; cursor: pointer; padding: 1px 2px; border-radius: 3px;
}
.th-filter-btn:hover { color: #0f3976; background: #e3ecf1; }
.th-filter-btn.active { color: #0f3976; }
/* 台账表头排序箭头 */
.th-sort-btn {
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; background: transparent; color: #9dacb4; cursor: pointer; padding: 1px 2px; border-radius: 3px;
}
.th-sort-btn:hover { color: #0f3976; background: #e3ecf1; }
.th-sort-btn.active { color: #0f3976; }
.th-sort-btn.active.desc { color: #0f3976; }
.filter-panel {
  position: fixed; z-index: 1200; width: 230px; background: #fff; border: 1px solid #d7dfe3;
  border-radius: 10px; box-shadow: 0 10px 32px rgba(23, 43, 58, .18); padding: 8px; font-size: 13px;
}
.filter-panel-search input {
  width: 100%; box-sizing: border-box; height: 30px; padding: 0 8px; border: 1px solid #dbe3e7;
  border-radius: 6px; font-size: 13px;
}
.filter-panel-list { max-height: 240px; overflow-y: auto; margin: 6px 0; }
.filter-panel-item {
  display: flex; align-items: center; gap: 6px; padding: 4px 6px; border-radius: 6px; cursor: pointer;
}
.filter-panel-item:hover { background: #f0f6f8; }
.filter-panel-item .fv { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filter-panel-item .fc { color: #93a0a8; font-size: 11px; }
.filter-panel-item.select-all { border-bottom: 1px solid #eef2f4; border-radius: 0; font-weight: 600; }
.filter-panel-empty { color: #93a0a8; text-align: center; padding: 12px 0; }
.filter-panel-foot { border-top: 1px solid #eef2f4; padding-top: 6px; }
.filter-clear { border: 0; background: transparent; color: #0f3976; cursor: pointer; font-size: 12px; padding: 2px 4px; }
.filter-clear[disabled] { color: #b7c3c8; cursor: not-allowed; }

/* ---------------------------------------------------------------- 成员端（普通用户） */
.user-create-form { display: flex; flex-direction: column; gap: 14px; padding: 16px; }
.user-create-form .field { max-width: 640px; }
.uc-row { display: flex; gap: 14px; flex-wrap: wrap; }
.uc-row .field { flex: 1; min-width: 180px; }
.uc-section { margin: 6px 0 0; font-size: 14px; color: #2d414e; }
.uc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; max-height: 300px; overflow-y: auto; }
.uc-item {
  display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; border: 1px solid #dbe3e7;
  border-radius: 10px; cursor: pointer; background: #fbfdfd; font-size: 13px;
}
.uc-item:hover { border-color: #0f3976; background: #f0f6f8; }
.uc-item input { position: absolute; opacity: 0; pointer-events: none; }
.uc-item:has(input:checked) { border-color: #0f3976; background: #e6eff4; box-shadow: inset 0 0 0 1px #0f3976; }
.uc-item span { font-weight: 600; color: #2d414e; }
.uc-item small { color: #7d8c95; }
.uc-actions { display: flex; justify-content: flex-end; }

/* 套餐与账号用量条（用户白名单页顶部） */
.sub-card { background: #f6f8fa; border: 1px solid #e3e8ef; border-radius: 8px; padding: 8px 12px; margin-bottom: 10px; font-size: 12.5px; color: #333; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }

/* 运营概览右上角 💰 套餐提示（悬停显示价目） */
.plan-tip-slot { display: inline-flex; align-items: center; margin-right: 10px; }
.plan-tip-slot:empty { display: none; }

.plan-tip { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: #fdf6e3; border: 1px solid #f0d896; cursor: help; font-size: 15px; }
.plan-tip .plan-tip-pop { display: none; position: absolute; right: -6px; top: calc(100% + 10px); z-index: 60; width: 430px; text-align: left; background: #fffbe8; border: 1px solid #f0d896; border-radius: 8px; padding: 10px 12px; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1); font-size: 12.5px; color: #333; line-height: 1.6; }
.plan-tip:hover .plan-tip-pop { display: block; }

/* 设备外借流转进度条 */
.transfer-card { background: #f8fafc; border: 1px solid #e3e8ef; border-radius: 8px; padding: 10px 12px; margin: 10px 0; }
.transfer-card h4 { margin: 0 0 8px; font-size: 13px; font-weight: 600; color: #1f2d3d; }
.transfer-track { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 6px 0 10px; }
.transfer-node { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; min-width: 78px; padding: 5px 8px; border-radius: 8px; background: #fff; border: 1px solid #dfe4ec; font-size: 12px; color: #1f2d3d; }
.transfer-node small { font-size: 10px; color: #8a94a6; }
.transfer-node.done { background: #eaf6f7; border-color: #b7e0e1; }
.transfer-node.pending { background: #fff7e6; border-color: #f0d896; border-style: dashed; }
.transfer-node.current { background: #eef4ff; border-color: #b9cdf5; }
.transfer-arrow { color: #9aa5b5; font-size: 13px; }
.transfer-list-row { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; font-size: 12px; color: #4a5568; padding: 4px 0; border-top: 1px dashed #e3e8ef; }
.transfer-list-row:first-of-type { border-top: none; }
.transfer-pick { width: 15px; height: 15px; accent-color: #2f6fed; }

/* ---- 成员端申领借用：小程序同款「挑选资产 → 申领单 → 提交」 ---- */
.uc-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.85fr); gap: 16px; align-items: start; }
.uc-cart-col { position: sticky; top: 16px; min-width: 0; }
.uc-pick-card { min-width: 0; }
.uc-pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 10px; max-height: 560px; overflow-y: auto; padding: 2px; }
.uc-pick-item { display: flex; gap: 10px; align-items: center; border: 1px solid #dbe3e5; border-radius: 10px; padding: 10px; background: #fff; }
.uc-pick-item:hover { border-color: #0f3976; background: #f4f8fa; }
.uc-pick-icon { width: 38px; height: 38px; flex: none; border-radius: 10px; background: #e6eff4; color: #0f3976; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px; }
.uc-pick-icon.mat { background: #fdf3e3; color: #b45309; }
.uc-pick-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.uc-pick-name { font-weight: 600; color: #1f313d; font-size: 14px; }
.uc-pick-main small { color: #7a888f; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uc-chain { color: #b45309 !important; white-space: normal !important; line-height: 1.4; }
.uc-banner { display: flex; justify-content: space-between; align-items: center; background: linear-gradient(135deg, #0f3976, #154b95); color: #fff; border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; }
.uc-banner-kicker { display: block; font-size: 11px; opacity: .85; letter-spacing: .08em; }
.uc-banner-title { display: block; font-size: 16px; font-weight: 700; margin-top: 2px; }
.uc-banner-sub { display: block; font-size: 12px; opacity: .8; margin-top: 2px; }
.uc-banner-badge { width: 42px; height: 42px; flex: none; border-radius: 50%; background: rgba(255, 255, 255, .22); display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 700; }
.uc-cart-item { display: flex; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px dashed #e2e9ec; }
.uc-qty-tag { font-size: 12px; color: #0f3976; background: #e6eff4; border-radius: 999px; padding: 2px 8px; flex: none; white-space: nowrap; }
.uc-stepper { display: flex; align-items: center; border: 1px solid #cbd7dc; border-radius: 8px; overflow: hidden; flex: none; }
.uc-stepper button { width: 26px; height: 26px; border: none; background: #f2f6f8; cursor: pointer; font-size: 14px; color: #0f3976; padding: 0; }
.uc-stepper button:hover { background: #e6eff4; }
.uc-stepper span { min-width: 34px; text-align: center; font-size: 13px; font-weight: 600; color: #1f313d; }
.uc-remove { border: none; background: none; color: #c25b4e; font-size: 18px; cursor: pointer; padding: 0 4px; flex: none; line-height: 1; }
.uc-remove:hover { color: #a33a2c; }
.uc-cart-empty { text-align: center; color: #8f9ba5; padding: 22px 0; font-size: 14px; }
.uc-cart-empty small { font-size: 12px; }
.uc-cart-tools { display: flex; justify-content: flex-end; margin-top: 8px; }
.uc-approvals { border: 1px solid #dbe3e5; border-radius: 10px; padding: 10px 12px; margin: 12px 0 0; }
.uc-approvals summary { cursor: pointer; font-weight: 600; color: #2d414e; font-size: 14px; user-select: none; }
.uc-approval-item { margin-top: 10px; display: flex; flex-direction: column; gap: 4px; }
.uc-approval-dept { font-weight: 600; font-size: 13px; color: #1f313d; }
.uc-approval-dept small { font-weight: 400; color: #7a888f; }
.uc-approval-item select { border: 1px solid #cbd7dc; border-radius: 8px; padding: 6px 8px; font-size: 13px; background: #fff; color: #1f313d; }
.uc-approval-item small { color: #7a888f; font-size: 12px; }
.uc-warn { color: #b45309 !important; }
.uc-form { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
.uc-form .field { max-width: none; }
.uc-delivery { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.uc-delivery-option { border: 1.5px solid #dbe3e5; border-radius: 10px; padding: 10px 12px; cursor: pointer; display: flex; flex-direction: column; gap: 2px; user-select: none; }
.uc-delivery-option:hover { border-color: #9db3c3; }
.uc-delivery-option.active { border-color: #0f3976; background: #e6eff4; box-shadow: inset 0 0 0 1px #0f3976; }
.uc-delivery-option strong { font-size: 14px; color: #1f313d; }
.uc-delivery-option small { color: #7a888f; font-size: 12px; }
.uc-rules { background: #f4f8fa; border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.uc-rules strong { font-size: 13px; color: #2d414e; }
.uc-rules small { color: #7a888f; font-size: 12px; }
.uc-submit { width: 100%; padding: 10px; font-size: 15px; }
.uc-submit:disabled { opacity: .5; cursor: not-allowed; }
@media (max-width: 1000px) {
  .uc-layout { grid-template-columns: 1fr; }
  .uc-cart-col { position: static; }
}

/* ---------------------------------------------------------------- 界面主题
   系统设置页切换（companies.theme_preset），覆盖背景/品牌色/侧栏；
   默认 ivd_blue 不需要任何覆盖。 */
body[data-theme="teal"] { --bg: #eef6f4; --line: #d8e8e4; --brand: #0f6b5f; --brand-deep: #0a4a41; }
body[data-theme="teal"] .sidebar { background: #0a2e2b; }
body[data-theme="teal"] .nav-item.active { background: #17564e; }
body[data-theme="teal"] .primary-btn:hover { background: #0b534a; }
body[data-theme="graphite"] { --bg: #f1f2f4; --line: #dfe1e6; --brand: #2f3b4c; --brand-deep: #222c39; }
body[data-theme="graphite"] .sidebar { background: #1d2430; }
body[data-theme="graphite"] .nav-item.active { background: #3a4657; }
body[data-theme="graphite"] .primary-btn:hover { background: #232d3b; }
body[data-theme="warm"] { --bg: #f7f4ee; --line: #e9e2d3; --brand: #8a6530; --brand-deep: #6f5226; }
body[data-theme="warm"] .sidebar { background: #332a1e; }
body[data-theme="warm"] .nav-item.active { background: #6b5433; }
body[data-theme="warm"] .primary-btn:hover { background: #6f5226; }
.theme-swatches { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.theme-swatch { display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 10px; border: 1.5px solid var(--line); background: #fff; cursor: pointer; font-size: 13px; color: var(--ink); }
.theme-swatch:hover { border-color: var(--brand); }
.theme-swatch.active { border-color: var(--brand); font-weight: 700; box-shadow: 0 0 0 2px rgba(15, 57, 118, .08); }
.theme-dot { width: 18px; height: 18px; border-radius: 50%; border: 1px solid rgba(0,0,0,.12); }

/* ===== 密码输入框：显示/隐藏切换 ===== */
.pw-wrap { position: relative; display: block; width: 100%; }
.pw-wrap input { padding-right: 44px; }
.pw-toggle {
  position: absolute; right: 7px; top: 50%; transform: translateY(-50%);
  display: flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; padding: 0; border: 0; border-radius: 8px;
  background: transparent; color: #7b93a5; cursor: pointer;
}
.pw-toggle:hover { background: #eef3f5; color: #0f3976; }
.pw-toggle svg { width: 18px; height: 18px; pointer-events: none; }

/* ===== 标签（快速筛选维度） ===== */
.mini-tag {
  display: inline-block;
  padding: 2px 10px;
  margin-right: 6px;
  border-radius: 999px;
  background: #eef3f8;
  color: var(--primary, #0f3976);
  font-size: 12px;
  font-weight: 600;
}
.tag-check-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}
.tag-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1px solid var(--line, #dfe7ec);
  border-radius: 999px;
  font-size: 13px;
  cursor: pointer;
  user-select: none;
}
.tag-check input { accent-color: var(--primary, #0f3976); }
.tag-add-row {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}
.tag-add-row .search-input { flex: 1; }
.tag-list { display: flex; flex-direction: column; }
.tag-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 4px;
  border-bottom: 1px solid var(--line, #eef2f4);
}
.tag-row .tag-name { flex: 1; font-weight: 600; }
