/* ============ 「两非两资」台账与处置管理平台 样式 ============ */
:root {
  --navy: #16284a;
  --navy-2: #1e3a68;
  --blue: #2b5ca8;
  --blue-2: #3a6fc4;
  --gold: #c8a44a;
  --bg: #f0f3f8;
  --card: #ffffff;
  --text: #2a3040;
  --text-2: #6b7280;
  --border: #e4e8ef;
  --green: #1a9e6c;
  --red: #d14b4b;
  --orange: #e08a2e;
  --purple: #7a5cc9;
  --cyan: #2a9db0;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
}
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: 14px; }

/* ---- 登录页 ---- */
.login-view {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #16284a 0%, #1e3a68 45%, #2b5ca8 100%);
  position: relative; overflow: hidden;
}
.login-view::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(200,164,74,.18), transparent 40%),
              radial-gradient(circle at 80% 80%, rgba(58,111,196,.25), transparent 45%);
}
.login-card {
  position: relative; width: 420px; background: #fff; border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,.3); overflow: hidden;
}
.login-brand {
  padding: 34px 40px 24px; text-align: center;
  background: linear-gradient(135deg, #1e3a68, #2b5ca8);
  color: #fff;
}
.brand-mark {
  width: 62px; height: 62px; margin: 0 auto 14px; border-radius: 12px;
  background: linear-gradient(135deg, var(--gold), #e2c77a);
  color: var(--navy); font-size: 26px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  letter-spacing: 1px;
}
.brand-mark.small { width: 40px; height: 40px; font-size: 17px; border-radius: 8px; margin: 0; }
.brand-title { font-size: 19px; font-weight: 700; letter-spacing: 1px; }
.brand-sub { font-size: 12px; opacity: .75; margin-top: 6px; }
.login-form { padding: 26px 40px 30px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border);
  border-radius: 8px; outline: none; transition: border .2s;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue); }
.login-hint {
  margin-top: 18px; padding: 12px 14px; background: #f7f9fc; border-radius: 8px;
  font-size: 12px; color: var(--text-2); line-height: 1.9;
}

/* ---- 按钮 ---- */
.btn {
  display: inline-block; padding: 9px 18px; border: none; border-radius: 8px;
  font-size: 14px; transition: all .15s;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-2); }
.btn-gold { background: var(--gold); color: #fff; }
.btn-gold:hover { background: #b8953e; }
.btn-ghost { background: transparent; color: #aeb8c8; border: 1px solid #3a4a6a; }
.btn-ghost:hover { color: #fff; border-color: #5a6a8a; }
.btn-danger { background: #fdf0f0; color: var(--red); border: 1px solid #f2caca; }
.btn-sm { padding: 5px 12px; font-size: 12px; border-radius: 6px; }
.btn-block { width: 100%; padding: 11px; font-size: 15px; letter-spacing: 4px; }

/* ---- 主框架 ---- */
.app-view { display: flex; min-height: 100vh; }
.sidebar {
  width: 216px; background: linear-gradient(180deg, var(--navy), var(--navy-2));
  color: #c6d0e0; display: flex; flex-direction: column; flex-shrink: 0;
}
.sidebar-brand {
  display: flex; align-items: center; gap: 10px; padding: 20px 18px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.sidebar-title { font-size: 15px; font-weight: 700; color: #fff; letter-spacing: 1px; }
.nav { flex: 1; padding: 12px 0; overflow-y: auto; }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 12px 22px; cursor: pointer;
  color: #b9c4d6; font-size: 14px; transition: all .15s; border-left: 3px solid transparent;
}
.nav-item .ico { width: 18px; text-align: center; font-style: normal; }
.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-item.active {
  background: rgba(200,164,74,.15); color: #e9c86e; border-left-color: var(--gold); font-weight: 600;
}
.sidebar-footer { padding: 16px; border-top: 1px solid rgba(255,255,255,.08); }
.user-box { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.user-avatar {
  width: 38px; height: 38px; border-radius: 50%; background: var(--gold); color: var(--navy);
  font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: 16px;
}
.user-name { color: #fff; font-size: 14px; font-weight: 600; }
.user-role { font-size: 12px; color: #8fa0b8; margin-top: 2px; }

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar {
  height: 58px; background: #fff; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; padding: 0 24px;
}
.topbar-title { font-size: 17px; font-weight: 700; }
.topbar-right { display: flex; align-items: center; gap: 16px; color: var(--text-2); font-size: 13px; }
.content { flex: 1; padding: 20px 24px; overflow-y: auto; }

/* ---- 通用组件 ---- */
.cards { display: grid; gap: 16px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 1100px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } }

.stat-card {
  background: var(--card); border-radius: 12px; padding: 18px 20px;
  border: 1px solid var(--border); position: relative; overflow: hidden;
}
.stat-card .stat-label { font-size: 13px; color: var(--text-2); }
.stat-card .stat-value { font-size: 26px; font-weight: 700; margin-top: 6px; }
.stat-card .stat-unit { font-size: 13px; color: var(--text-2); font-weight: 400; margin-left: 4px; }
.stat-card .stat-extra { font-size: 12px; color: var(--text-2); margin-top: 4px; }
.stat-card .stat-bar { position: absolute; left: 0; top: 0; bottom: 0; width: 4px; }
.c-accent .stat-value { color: var(--gold); }
.c-blue .stat-value { color: var(--blue); }
.c-green .stat-value { color: var(--green); }
.c-red .stat-value { color: var(--red); }

.panel { background: var(--card); border-radius: 12px; border: 1px solid var(--border); }
.panel-head {
  padding: 16px 20px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.panel-title { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.panel-title::before { content: ""; width: 4px; height: 16px; background: var(--gold); border-radius: 2px; }
.panel-body { padding: 20px; }
.panel-tools { display: flex; gap: 8px; align-items: center; }

/* 表格 */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 11px 12px; text-align: left; border-bottom: 1px solid var(--border); font-size: 13px; white-space: nowrap; }
th { background: #f7f9fc; color: var(--text-2); font-weight: 600; }
tr:hover td { background: #fafbfd; }
.t-num { font-family: Consolas, monospace; }
.t-right { text-align: right; }

/* 标签/徽章 */
.tag { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; }
.tag-debt { background: #eef3fc; color: var(--blue); }
.tag-equity { background: #f3eefc; color: var(--purple); }
.tag-physical { background: #eaf7f1; color: var(--green); }
.tag-pending { background: #fdf3e7; color: var(--orange); }
.tag-processing { background: #eef3fc; color: var(--blue); }
.tag-disposed { background: #eaf7f1; color: var(--green); }
.tag-writeoff { background: #f0f0f2; color: #7a7f88; }
.tag-held { background: #f5eefc; color: var(--purple); }
.tag-partner { background: #fdf6e3; color: #a07d1f; }
.tag-whitelist { background: #eaf7f1; color: var(--green); }
.tag-blacklist { background: #fdf0f0; color: var(--red); }

/* 进度条 */
.progress { height: 8px; background: #eef1f6; border-radius: 6px; overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--blue), var(--blue-2)); }
.progress.gold > i { background: linear-gradient(90deg, var(--gold), #e2c77a); }
.progress.green > i { background: linear-gradient(90deg, #1a9e6c, #2bbf87); }

/* 环形图（conic-gradient） */
.ring-wrap { display: flex; align-items: center; gap: 20px; }
.ring { position: relative; width: 140px; height: 140px; border-radius: 50%; flex-shrink: 0; }
.ring::after {
  content: ""; position: absolute; inset: 22px; background: #fff; border-radius: 50%;
}
.ring-center {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; z-index: 1;
}
.ring-center .rc-v { font-size: 20px; font-weight: 700; }
.ring-center .rc-l { font-size: 11px; color: var(--text-2); }
.legend { flex: 1; }
.legend-item { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 13px; }
.legend-dot { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.legend-item .lg { color: var(--text-2); margin-left: auto; }

/* 柱状图（div） */
.hbar { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.hbar-label { width: 110px; font-size: 13px; color: var(--text-2); text-align: right; flex-shrink: 0; }
.hbar-track { flex: 1; height: 22px; background: #f0f3f8; border-radius: 4px; position: relative; overflow: hidden; }
.hbar-fill { height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--blue), var(--blue-2)); }
.hbar-val { width: 80px; font-size: 12px; color: var(--text-2); }

/* 表单弹窗 */
.modal-mask {
  position: fixed; inset: 0; background: rgba(20,30,50,.45); z-index: 100;
  display: flex; align-items: center; justify-content: center;
}
.modal { background: #fff; border-radius: 12px; width: 640px; max-width: 94vw; max-height: 88vh; overflow: auto; }
.modal-head {
  padding: 16px 22px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; font-weight: 700; font-size: 15px;
}
.modal-body { padding: 20px 22px; }
.modal-foot { padding: 14px 22px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.close-x { cursor: pointer; font-size: 20px; color: var(--text-2); line-height: 1; }

/* 筛选工具栏 */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar select, .toolbar input {
  padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; outline: none; background: #fff;
}
.toolbar .spacer { flex: 1; }

/* 时间线（审计/留痕） */
.timeline { position: relative; padding-left: 22px; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 2px; background: var(--border); }
.tl-item { position: relative; padding: 0 0 18px 8px; }
.tl-item::before {
  content: ""; position: absolute; left: -20px; top: 5px; width: 10px; height: 10px;
  border-radius: 50%; background: var(--blue); border: 2px solid #fff; box-shadow: 0 0 0 2px var(--border);
}
.tl-item.green::before { background: var(--green); }
.tl-item.gold::before { background: var(--gold); }
.tl-item.red::before { background: var(--red); }
.tl-title { font-weight: 600; font-size: 13px; }
.tl-desc { font-size: 12px; color: var(--text-2); margin-top: 3px; line-height: 1.6; }
.tl-time { font-size: 11px; color: #9aa3b2; margin-top: 3px; }

/* 匹配卡片 */
.match-card { border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; margin-bottom: 12px; position: relative; }
.match-score {
  position: absolute; top: 12px; right: 14px; font-size: 22px; font-weight: 700; color: var(--gold);
}
.match-name { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.match-meta { font-size: 12px; color: var(--text-2); margin-top: 6px; line-height: 1.7; }
.match-reasons { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }

.placeholder { text-align: center; color: #9aa3b2; padding: 40px; font-size: 13px; }
.empty-tip { text-align: center; color: #9aa3b2; padding: 30px; font-size: 13px; }
.section-title { font-size: 14px; font-weight: 700; margin: 6px 0 12px; color: var(--navy-2); }
.mt16 { margin-top: 16px; }
.mb16 { margin-bottom: 16px; }
.flex { display: flex; align-items: center; gap: 10px; }
.muted { color: var(--text-2); font-size: 12px; }

/* ---- 分页控件 ---- */
.pagination { display: flex; align-items: center; gap: 10px; margin-top: 14px; justify-content: flex-end; flex-wrap: wrap; }
.pagination button {
  padding: 5px 14px; border: 1px solid var(--border); background: #fff;
  border-radius: 6px; cursor: pointer; font-size: 13px;
}
.pagination button:hover:not(:disabled) { border-color: var(--blue); color: var(--blue); }
.pagination button:disabled { opacity: .4; cursor: not-allowed; }
.pagination .page-info { font-size: 13px; color: var(--text-2); }

/* ---- 资产选择器（搜索+分页） ---- */
.picker-search { display: flex; gap: 8px; margin-bottom: 12px; }
.picker-search input { flex: 1; padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; outline: none; }
.picker-search input:focus { border-color: var(--blue); }
.picker-table { max-height: 380px; overflow-y: auto; border: 1px solid var(--border); border-radius: 8px; }
.picker-table table { min-width: 560px; }
.picker-row { cursor: pointer; transition: background .1s; }
.picker-row:hover td { background: #f5f8fd; }
.picker-row.selected td { background: #eef3fc; }
.picker-check { width: 16px; height: 16px; cursor: pointer; }
.pick-field { display: flex; align-items: center; gap: 8px; }
.pick-field .pick-show {
  flex: 1; padding: 8px 12px; border: 1px dashed var(--border); border-radius: 8px;
  color: var(--text-2); font-size: 13px; min-height: 38px; display: flex; align-items: center;
}
.pick-field .pick-show.has-value { border-style: solid; color: var(--text); border-color: var(--border); }
