/* 融信金融助贷CRM - 后台样式 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font: 14px/1.6 "Microsoft YaHei", "PingFang SC", sans-serif; background: #f0f2f5; color: #333; }
a { color: #1e6fff; text-decoration: none; }
a:hover { opacity: .8; }

.layout { display: flex; min-height: 100vh; }
.sidebar { width: 220px; background: #001529; color: #c9d3e0; flex-shrink: 0; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { font-size: 18px; font-weight: 700; color: #fff; padding: 18px 20px; border-bottom: 1px solid rgba(255,255,255,.08); }
.brand span { color: #4d8bff; font-size: 12px; margin-left: 4px; }
.menu { padding: 8px 0; }
.menu-item { display: flex; align-items: center; padding: 11px 20px; color: #c9d3e0; cursor: pointer; }
.menu-item:hover { color: #fff; background: rgba(255,255,255,.06); }
.menu-item.active { color: #fff; background: #1e6fff; }
.menu-item .ico { width: 22px; margin-right: 8px; }
.menu-item .arrow { margin-left: auto; transition: .2s; font-size: 12px; }
.menu-group.open .arrow { transform: rotate(180deg); }
.sub { display: none; background: rgba(0,0,0,.25); }
.menu-group.open .sub { display: block; }
.sub-item { padding-left: 50px; font-size: 13px; }

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar { height: 56px; background: #fff; display: flex; align-items: center; justify-content: space-between; padding: 0 24px; box-shadow: 0 1px 4px rgba(0,21,41,.08); position: sticky; top: 0; z-index: 10; }
.crumb { font-size: 15px; font-weight: 600; }
.user { display: flex; align-items: center; gap: 10px; }
.role { background: #e8f1ff; color: #1e6fff; padding: 2px 10px; border-radius: 10px; font-size: 12px; }
.content { padding: 20px 24px; flex: 1; }

/* 通用组件 */
.card { background: #fff; border-radius: 8px; padding: 18px 20px; box-shadow: 0 1px 3px rgba(0,0,0,.05); margin-bottom: 16px; }
.card-title { font-size: 15px; font-weight: 600; margin-bottom: 14px; border-left: 3px solid #1e6fff; padding-left: 10px; }
.grid { display: grid; gap: 16px; }
.grid-5 { grid-template-columns: repeat(5, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.stat { background: #fff; border-radius: 8px; padding: 16px 18px; box-shadow: 0 1px 3px rgba(0,0,0,.05); }
.stat .num { font-size: 26px; font-weight: 700; color: #1e6fff; margin: 4px 0; }
.stat .lbl { color: #888; font-size: 13px; }
.stat.warn .num { color: #fa8c16; }
.stat.green .num { color: #52c41a; }
.stat.red .num { color: #f5222d; }

table.tbl { width: 100%; border-collapse: collapse; background: #fff; }
.tbl th, .tbl td { padding: 10px 12px; border-bottom: 1px solid #eef0f3; text-align: left; white-space: nowrap; }
.tbl th { background: #fafbfc; color: #666; font-weight: 600; }
.tbl tr:hover td { background: #f7faff; }
.tbl-wrap { overflow-x: auto; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,.05); background: #fff; }

.btn { display: inline-block; padding: 6px 14px; background: #1e6fff; color: #fff; border: none; border-radius: 4px; cursor: pointer; font-size: 13px; line-height: 1.5; }
.btn:hover { background: #4d8bff; color: #fff; opacity: 1; }
.btn-sm { padding: 3px 10px; font-size: 12px; }
.btn-outline { background: #fff; color: #1e6fff; border: 1px solid #1e6fff; }
.btn-outline:hover { background: #f0f6ff; }
.btn-danger { background: #f5222d; }
.btn-danger:hover { background: #ff4d4f; }
.btn-warn { background: #fa8c16; }
.btn-success { background: #52c41a; }
.btn[disabled] { background: #bbb; cursor: not-allowed; }

.form-item { margin-bottom: 14px; }
.form-item label { display: block; margin-bottom: 5px; color: #555; }
.form-item label .req { color: #f5222d; margin-right: 2px; }
input[type=text], input[type=number], input[type=password], input[type=date], select, textarea {
  width: 100%; padding: 8px 10px; border: 1px solid #d9dce1; border-radius: 4px; font-size: 13px; background: #fff;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: #1e6fff; }
.inline-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.inline-form .form-item { margin-bottom: 0; min-width: 130px; }
.filter-bar .form-item input, .filter-bar .form-item select { min-width: 130px; }

.tag { display: inline-block; padding: 1px 8px; border-radius: 3px; font-size: 12px; background: #eef2f7; color: #666; margin: 1px 2px; }
.tag-blue { background: #e8f1ff; color: #1e6fff; }
.tag-green { background: #e9f9e8; color: #52c41a; }
.tag-orange { background: #fff3e0; color: #fa8c16; }
.tag-red { background: #ffece8; color: #f5222d; }
.tag-gray { background: #f0f0f0; color: #888; }

.badge-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.badge-dot.red { background: #f5222d; }
.badge-dot.green { background: #52c41a; }
.badge-dot.orange { background: #fa8c16; }
.badge-dot.gray { background: #bbb; }

.pagination { display: flex; gap: 6px; margin-top: 14px; align-items: center; justify-content: flex-end; }
.pagination a, .pagination span { padding: 5px 11px; border: 1px solid #d9dce1; border-radius: 4px; background: #fff; color: #333; font-size: 13px; }
.pagination .cur { background: #1e6fff; color: #fff; border-color: #1e6fff; }
.pagination .info { border: none; background: none; color: #888; }

.modal-mask { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 100; align-items: flex-start; justify-content: center; padding: 60px 16px; overflow-y: auto; }
.modal-mask.show { display: flex; }
.modal { background: #fff; border-radius: 8px; width: 560px; max-width: 100%; padding: 22px 24px; }
.modal.wide { width: 860px; }
.modal h3 { margin-bottom: 16px; font-size: 16px; }
.modal .modal-foot { text-align: right; margin-top: 18px; }
.modal .modal-foot .btn { margin-left: 10px; }

.alert { padding: 10px 14px; border-radius: 4px; margin-bottom: 14px; }
.alert-ok { background: #e9f9e8; color: #389e0d; border: 1px solid #b7eb8f; }
.alert-err { background: #ffece8; color: #cf1322; border: 1px solid #ffa39e; }

.timeline { list-style: none; }
.timeline li { position: relative; padding: 0 0 18px 24px; border-left: 2px solid #e6eaf0; }
.timeline li::before { content: ''; position: absolute; left: -6px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: #1e6fff; }
.timeline .t { color: #999; font-size: 12px; }
.timeline .body { margin-top: 3px; }

.graph-box { position: relative; min-height: 220px; border: 1px dashed #d9dce1; border-radius: 8px; padding: 10px; overflow: auto; }
.gnode { position: absolute; padding: 6px 12px; border-radius: 6px; background: #eef2f7; border: 1px solid #d9dce1; font-size: 13px; }
.gnode.main { background: #1e6fff; color: #fff; border-color: #1e6fff; }
.gedge { position: absolute; height: 1px; background: #b9c2cf; transform-origin: 0 0; }
.gedge-lbl { position: absolute; font-size: 11px; color: #888; background: #fff; padding: 0 3px; }

.empty { text-align: center; color: #999; padding: 40px 0; }
.mt10 { margin-top: 10px; } .mb10 { margin-bottom: 10px; }
.text-right { text-align: right; }
.flex { display: flex; gap: 10px; align-items: center; }
.muted { color: #999; font-size: 12px; }
.strong { font-weight: 600; }
.kv { display: grid; grid-template-columns: 110px 1fr; row-gap: 8px; }
.kv .k { color: #888; }

.chart-bar { display: flex; align-items: flex-end; gap: 14px; height: 180px; padding: 10px 4px 0; }
.chart-bar .bar-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.chart-bar .bar { width: 60%; max-width: 46px; background: linear-gradient(180deg,#4d8bff,#1e6fff); border-radius: 4px 4px 0 0; min-height: 2px; }
.chart-bar .bar-lbl { font-size: 11px; color: #888; margin-top: 6px; }
.chart-bar .bar-val { font-size: 11px; color: #333; margin-bottom: 3px; }

.rank-list { list-style: none; }
.rank-list li { display: flex; align-items: center; padding: 8px 0; border-bottom: 1px dashed #eef0f3; }
.rank-list .rk { width: 26px; height: 26px; border-radius: 50%; background: #eef2f7; text-align: center; line-height: 26px; font-size: 12px; margin-right: 10px; color: #666; }
.rank-list li:nth-child(1) .rk { background: #ffd700; color: #fff; }
.rank-list li:nth-child(2) .rk { background: #b9c2cf; color: #fff; }
.rank-list li:nth-child(3) .rk { background: #d98806; color: #fff; }
.rank-list .nm { flex: 1; }
.rank-list .vl { font-weight: 600; }

@media (max-width: 1000px) {
  .grid-5, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .sidebar { width: 64px; }
  .sidebar .brand { font-size: 12px; padding: 16px 8px; }
  .menu-item span:not(.ico) { display: none; }
  .sub { display: none !important; }
}
