/* ============================================================
   催收贷后管理系统 · 企业版界面
   ============================================================ */
:root {
  --nav-bg: #0B1220;
  --nav-bg-2: #111C31;
  --bg: #F3F5F9;
  --surface: #FFFFFF;
  --line: #E4E8F0;
  --line-soft: #EEF1F6;
  --text: #111827;
  --text-2: #4B5563;
  --text-3: #9099A8;
  --primary: #2563EB;
  --primary-hover: #1D4ED8;
  --primary-soft: #EEF3FF;
  --green: #15803D;
  --green-soft: #E9F7EF;
  --amber: #B45309;
  --amber-soft: #FEF3E2;
  --red: #B91C1C;
  --red-soft: #FDECEC;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", sans-serif;
  --num: "Bahnschrift", "DIN Alternate", "Segoe UI", "Microsoft YaHei", sans-serif;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, .16);
  --radius: 10px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font); font-size: 13px; color: var(--text);
  background: var(--bg); line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; font-size: 13px; color: var(--text); }
a { color: var(--primary); text-decoration: none; }
.hidden { display: none !important; }
.num { font-family: var(--num); font-variant-numeric: tabular-nums; }
.muted { color: var(--text-3); }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ================= 登录 ================= */
.login-screen { display: flex; min-height: 100vh; background: #fff; }
.login-left {
  width: 54%; max-width: 760px; min-width: 480px;
  background:
    radial-gradient(900px 480px at 12% 8%, rgba(37, 99, 235, .28), transparent 60%),
    radial-gradient(700px 420px at 88% 92%, rgba(14, 116, 144, .18), transparent 60%),
    linear-gradient(160deg, #0B1220 0%, #0E1A2F 55%, #0B1220 100%);
  color: #fff; padding: 44px 56px; display: flex; flex-direction: column;
  position: relative; overflow: hidden;
}
.login-left::after {
  content: ''; position: absolute; inset: 0; opacity: .35;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse at 30% 20%, #000 30%, transparent 75%);
          mask-image: radial-gradient(ellipse at 30% 20%, #000 30%, transparent 75%);
  pointer-events: none;
}
.login-left > * { position: relative; z-index: 1; }
.login-brand { display: flex; align-items: center; gap: 14px; }
.logo-mark {
  width: 46px; height: 46px; border-radius: 12px; background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1); display: grid; place-items: center;
}
.logo-mark svg { width: 30px; height: 30px; }
.logo-mark.small { width: 36px; height: 36px; border-radius: 9px; background: rgba(37,99,235,.14); border-color: rgba(37,99,235,.25); }
.logo-mark.small svg { width: 24px; height: 24px; }
.login-brand-name { font-size: 17px; font-weight: 600; letter-spacing: .5px; }
.login-brand-sub { font-size: 9.5px; color: rgba(255,255,255,.4); letter-spacing: 1.6px; margin-top: 2px; }
.login-copy { margin: auto 0; max-width: 520px; padding-bottom: 20px; }
.login-copy h1 { font-size: 34px; line-height: 1.4; font-weight: 600; letter-spacing: 1px; }
.login-copy p { margin-top: 16px; font-size: 13.5px; color: rgba(255,255,255,.62); max-width: 420px; }
.login-points { list-style: none; margin-top: 34px; display: flex; flex-direction: column; gap: 13px; }
.login-points li { display: flex; align-items: center; gap: 10px; font-size: 13px; color: rgba(255,255,255,.78); }
.login-points .dot { width: 5px; height: 5px; border-radius: 50%; background: #60A5FA; box-shadow: 0 0 0 4px rgba(96,165,250,.15); }
.login-foot { font-size: 11px; color: rgba(255,255,255,.3); }
.login-right { flex: 1; display: grid; place-items: center; padding: 40px; background: #fff; }
.login-card { width: 360px; }
.login-card h2 { font-size: 22px; font-weight: 600; }
.login-sub { font-size: 12.5px; color: var(--text-3); margin: 6px 0 28px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 12.5px; color: var(--text-2); margin-bottom: 7px; }
.field input, .field select, .field textarea {
  width: 100%; height: 40px; padding: 0 12px; border: 1px solid var(--line);
  border-radius: 7px; outline: none; background: #fff; transition: border-color .15s, box-shadow .15s;
}
.field textarea { height: auto; padding: 9px 12px; resize: vertical; min-height: 76px; line-height: 1.6; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}
.pwd-wrap { position: relative; }
.pwd-wrap input { padding-right: 42px; }
.pwd-eye { position: absolute; right: 6px; top: 6px; width: 28px; height: 28px; border-radius: 5px; color: var(--text-3); display: grid; place-items: center; }
.pwd-eye:hover { background: var(--line-soft); color: var(--text-2); }
.pwd-eye svg { width: 17px; height: 17px; }
.login-row { display: flex; align-items: center; justify-content: space-between; margin: 2px 0 16px; }
.check { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text-2); cursor: pointer; user-select: none; }
.check input { width: 14px; height: 14px; accent-color: var(--primary); }
.login-hint { font-size: 11.5px; color: var(--text-3); }
.login-error { min-height: 18px; font-size: 12px; color: var(--red); margin-bottom: 6px; }
.login-tip { margin-top: 18px; font-size: 11.5px; color: var(--text-3); text-align: center; }
.btn-block { width: 100%; justify-content: center; }
.btn-lg { height: 42px; font-size: 14px; }

/* ================= 布局 ================= */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: 218px; flex-shrink: 0; background: var(--nav-bg);
  color: #fff; display: flex; flex-direction: column;
  position: fixed; inset: 0 auto 0 0; z-index: 100;
  background-image: linear-gradient(180deg, var(--nav-bg) 0%, var(--nav-bg-2) 100%);
}
.brand { height: 64px; display: flex; align-items: center; gap: 11px; padding: 0 16px; border-bottom: 1px solid rgba(255,255,255,.07); }
.brand-text { min-width: 0; }
.brand-name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-sub { font-size: 10.5px; color: rgba(255,255,255,.38); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav { flex: 1; overflow-y: auto; padding: 12px 10px; }
.nav-group { font-size: 10px; color: rgba(255,255,255,.32); letter-spacing: 1.2px; padding: 14px 10px 7px; }
.nav-item {
  display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 11px;
  border-radius: 7px; color: rgba(255,255,255,.66); font-size: 13px; cursor: pointer;
  transition: background .14s, color .14s; margin-bottom: 2px; position: relative;
}
.nav-item svg { width: 17px; height: 17px; flex-shrink: 0; opacity: .8; }
.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-item.active { background: rgba(37,99,235,.18); color: #fff; font-weight: 500; }
.nav-item.active::before {
  content: ''; position: absolute; left: -10px; top: 9px; bottom: 9px; width: 3px;
  border-radius: 0 3px 3px 0; background: #3B82F6;
}
.nav-item.active svg { opacity: 1; color: #60A5FA; }
.nav-badge { margin-left: auto; background: #DC2626; color: #fff; font-size: 10px; padding: 1px 6px; border-radius: 9px; font-family: var(--num); }
.sidebar-foot {
  padding: 12px 18px; border-top: 1px solid rgba(255,255,255,.07);
  font-size: 11px; color: rgba(255,255,255,.38); display: flex; align-items: center; gap: 7px;
}
.online-dot { width: 6px; height: 6px; border-radius: 50%; background: #22C55E; box-shadow: 0 0 0 3px rgba(34,197,94,.15); }

.main { flex: 1; margin-left: 218px; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 64px; background: #fff; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 22px; position: sticky; top: 0; z-index: 60;
}
.page-title { font-size: 16px; font-weight: 600; line-height: 1.25; }
.page-sub { font-size: 11.5px; color: var(--text-3); margin-top: 1px; }
.topbar-right { display: flex; align-items: center; gap: 18px; }
.today { font-size: 12px; color: var(--text-3); font-family: var(--num); }
.user-menu-wrap { position: relative; }
.user-chip { display: flex; align-items: center; gap: 9px; padding: 4px 6px; border-radius: 8px; }
.user-chip:hover { background: var(--line-soft); }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, #2563EB, #0EA5E9);
  color: #fff; display: grid; place-items: center; font-size: 13px; font-weight: 600;
}
.user-meta { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.25; }
.user-name { font-size: 12.5px; font-weight: 500; }
.user-role { font-size: 10.5px; color: var(--text-3); }
.chevron { width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid var(--text-3); margin-left: 2px; }
.dropdown {
  position: absolute; right: 0; top: 46px; width: 150px; background: #fff;
  border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow-lg);
  padding: 5px; z-index: 200;
}
.dropdown button { display: block; width: 100%; text-align: left; padding: 8px 11px; border-radius: 6px; font-size: 12.5px; }
.dropdown button:hover { background: var(--line-soft); }
.dropdown button.danger { color: var(--red); }

.view { padding: 18px 22px 30px; }
.view-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 14px; gap: 12px; flex-wrap: wrap; }
.view-head h2 { font-size: 15px; font-weight: 600; }
.view-head p { font-size: 12px; color: var(--text-3); margin-top: 2px; }

/* ================= 卡片 / 栅格 ================= */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card + .card { margin-top: 14px; }
.card-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line-soft); }
.card-title { font-size: 13.5px; font-weight: 600; }
.card-extra { font-size: 11.5px; color: var(--text-3); }
.card-body { padding: 16px 18px; }
.grid { display: grid; gap: 14px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2-1 { grid-template-columns: 2fr 1fr; }
.grid-1-1 { grid-template-columns: 1fr 1fr; }
.mt14 { margin-top: 14px; }

/* KPI */
.kpi { padding: 16px 18px; display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.kpi-label { font-size: 12px; color: var(--text-3); }
.kpi-value { font-size: 25px; font-weight: 600; font-family: var(--num); letter-spacing: -.4px; margin-top: 7px; line-height: 1.1; }
.kpi-value small { font-size: 12px; color: var(--text-3); font-weight: 400; margin-left: 3px; }
.kpi-foot { font-size: 11px; color: var(--text-3); margin-top: 8px; }
.kpi-icon { width: 38px; height: 38px; border-radius: 9px; display: grid; place-items: center; flex-shrink: 0; }
.kpi-icon svg { width: 19px; height: 19px; }
.tone-blue { background: #EEF3FF; color: #2563EB; }
.tone-green { background: #E9F7EF; color: #15803D; }
.tone-amber { background: #FEF3E2; color: #B45309; }
.tone-red { background: #FDECEC; color: #B91C1C; }
.tone-slate { background: #F1F5F9; color: #475569; }

/* ================= 表格 ================= */
.table-wrap { overflow: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.tbl th {
  text-align: left; font-weight: 500; color: var(--text-3); background: #FAFBFD;
  padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; font-size: 11.5px;
}
.tbl td { padding: 11px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.tbl tbody tr { transition: background .12s; }
.tbl tbody tr:hover { background: #FAFCFF; }
.tbl tbody tr.clickable { cursor: pointer; }
.tbl tbody tr:last-child td { border-bottom: none; }
.tbl .money { font-family: var(--num); font-variant-numeric: tabular-nums; }
.tbl .actions { display: flex; gap: 6px; justify-content: flex-end; }

/* 徽章 */
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 999px; font-size: 11px; line-height: 18px; white-space: nowrap; }
.pill.m1 { background: #FEF3E2; color: #B45309; }
.pill.m2 { background: #FFEDD5; color: #C2410C; }
.pill.m3 { background: #FDECEC; color: #B91C1C; }
.pill.m4 { background: #FEE2E2; color: #7F1D1D; }
.pill.green { background: var(--green-soft); color: var(--green); }
.pill.blue { background: var(--primary-soft); color: var(--primary); }
.pill.gray { background: #F1F5F9; color: #475569; }
.pill.red { background: var(--red-soft); color: var(--red); }
.pill.amber { background: var(--amber-soft); color: var(--amber); }
.risk-high { color: #B91C1C; font-weight: 500; }
.risk-mid { color: #B45309; }
.risk-low { color: #15803D; }

/* ================= 按钮 ================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 34px; padding: 0 14px; border-radius: 6px; font-size: 12.5px;
  border: 1px solid var(--line); background: #fff; color: var(--text-2);
  transition: all .14s; white-space: nowrap;
}
.btn:hover { border-color: #CBD5E1; background: #F8FAFC; color: var(--text); }
.btn svg { width: 15px; height: 15px; }
.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-danger { color: var(--red); border-color: #F3C6C6; }
.btn-danger:hover { background: var(--red-soft); border-color: #EFB4B4; color: var(--red); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: var(--line-soft); }
.btn-sm { height: 28px; padding: 0 10px; font-size: 12px; }
.btn-icon { width: 28px; height: 28px; padding: 0; border-radius: 5px; border-color: transparent; background: transparent; color: var(--text-3); }
.btn-icon:hover { background: var(--line-soft); color: var(--text); }
.btn-icon svg { width: 16px; height: 16px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* ================= 表单 ================= */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid label { display: block; font-size: 12px; color: var(--text-2); margin-bottom: 5px; }
.form-grid input, .form-grid select, .form-grid textarea {
  width: 100%; height: 36px; border: 1px solid var(--line); border-radius: 6px; padding: 0 10px; outline: none; background: #fff;
}
.form-grid textarea { height: auto; min-height: 70px; padding: 8px 10px; resize: vertical; line-height: 1.6; }
.form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.form-grid .req::after { content: ' *'; color: var(--red); }
.form-note { font-size: 11px; color: var(--text-3); margin-top: 4px; }

.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.toolbar .spacer { flex: 1; }
.search-box { position: relative; }
.search-box input { height: 34px; width: 230px; padding: 0 11px 0 32px; border: 1px solid var(--line); border-radius: 6px; outline: none; }
.search-box input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.search-box svg { position: absolute; left: 10px; top: 9px; width: 15px; height: 15px; color: var(--text-3); }
select.ctl, input.ctl { height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 6px; background: #fff; outline: none; }
select.ctl:focus, input.ctl:focus { border-color: var(--primary); }

/* ================= 弹窗 / 抽屉 ================= */
.overlay {
  position: fixed; inset: 0; background: rgba(15, 23, 42, .45);
  z-index: 300; display: flex; align-items: center; justify-content: center; padding: 30px;
  animation: fade .18s ease;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: #fff; border-radius: 12px; width: 580px; max-width: 100%; max-height: 90vh;
  display: flex; flex-direction: column; box-shadow: var(--shadow-lg); animation: pop .18s ease;
}
.modal.wide { width: 780px; }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.99); } to { opacity: 1; transform: none; } }
.modal-head { padding: 16px 20px; border-bottom: 1px solid var(--line-soft); display: flex; align-items: center; justify-content: space-between; }
.modal-head h3 { font-size: 15px; font-weight: 600; }
.modal-body { padding: 20px; overflow-y: auto; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--line-soft); display: flex; justify-content: flex-end; gap: 8px; }
.close-x { width: 28px; height: 28px; border-radius: 6px; color: var(--text-3); display: grid; place-items: center; }
.close-x:hover { background: var(--line-soft); color: var(--text); }
.close-x svg { width: 16px; height: 16px; }

.drawer-overlay { position: fixed; inset: 0; background: rgba(15, 23, 42, .4); z-index: 250; animation: fade .18s ease; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 720px; max-width: 92vw; background: #fff;
  z-index: 251; display: flex; flex-direction: column; box-shadow: -10px 0 40px rgba(15,23,42,.18);
  animation: slideIn .22s ease;
}
@keyframes slideIn { from { transform: translateX(24px); opacity: .6; } to { transform: none; opacity: 1; } }
.drawer-head { padding: 18px 22px; border-bottom: 1px solid var(--line-soft); }
.drawer-head-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.drawer-title { font-size: 18px; font-weight: 600; display: flex; align-items: center; gap: 9px; }
.drawer-sub { font-size: 12px; color: var(--text-3); margin-top: 5px; font-family: var(--num); }
.drawer-body { flex: 1; overflow-y: auto; padding: 18px 22px 30px; }
.drawer-foot { padding: 12px 22px; border-top: 1px solid var(--line-soft); display: flex; justify-content: space-between; gap: 8px; }
.info-section { margin-bottom: 20px; }
.info-section h4 { font-size: 12.5px; font-weight: 600; color: var(--text-2); margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
.info-section h4::before { content: ''; width: 3px; height: 12px; border-radius: 2px; background: var(--primary); }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px 18px; font-size: 12.5px; }
.info-item { display: flex; gap: 8px; min-width: 0; }
.info-item .k { color: var(--text-3); flex-shrink: 0; width: 76px; }
.info-item .v { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.info-item.full { grid-column: 1 / -1; }
.sensitive { display: inline-flex; align-items: center; gap: 4px; }
.eye-btn { width: 22px; height: 22px; border-radius: 4px; color: var(--text-3); display: inline-grid; place-items: center; }
.eye-btn:hover { background: var(--line-soft); color: var(--primary); }
.eye-btn svg { width: 14px; height: 14px; }

/* 标签页 */
.tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.tab { padding: 9px 0; font-size: 12.5px; color: var(--text-3); position: relative; }
.tab.active { color: var(--primary); font-weight: 500; }
.tab.active::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--primary); border-radius: 2px 2px 0 0; }

/* 时间线 */
.timeline { position: relative; padding-left: 18px; }
.timeline::before { content: ''; position: absolute; left: 4px; top: 6px; bottom: 6px; width: 1px; background: var(--line); }
.tl-item { position: relative; padding-bottom: 16px; }
.tl-item::before {
  content: ''; position: absolute; left: -17.5px; top: 5px; width: 7px; height: 7px; border-radius: 50%;
  background: #fff; border: 2px solid var(--primary);
}
.tl-meta { display: flex; gap: 8px; align-items: center; font-size: 11px; color: var(--text-3); }
.tl-note { font-size: 12.5px; margin-top: 4px; color: var(--text); white-space: pre-wrap; word-break: break-word; }
.tl-tags { margin-top: 5px; display: flex; gap: 6px; flex-wrap: wrap; }

/* 待办列表 */
.task-list { display: flex; flex-direction: column; }
.task-item { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.task-item:last-child { border-bottom: none; }
.task-time { font-family: var(--num); font-size: 11.5px; color: var(--primary); background: var(--primary-soft); padding: 2px 7px; border-radius: 5px; flex-shrink: 0; }
.task-main { flex: 1; min-width: 0; }
.task-title { font-size: 12.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-sub { font-size: 11px; color: var(--text-3); margin-top: 1px; }

/* 排行 */
.rank-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line-soft); }
.rank-row:last-child { border-bottom: none; }
.rank-no { width: 20px; height: 20px; border-radius: 5px; background: #F1F5F9; color: var(--text-3); display: grid; place-items: center; font-size: 11px; font-family: var(--num); }
.rank-no.top { background: #FEF3E2; color: #B45309; font-weight: 600; }
.rank-name { font-size: 12.5px; width: 62px; flex-shrink: 0; }
.rank-bar { flex: 1; height: 6px; background: #F1F5F9; border-radius: 3px; overflow: hidden; }
.rank-bar i { display: block; height: 100%; background: linear-gradient(90deg, #3B82F6, #60A5FA); border-radius: 3px; }
.rank-val { font-family: var(--num); font-size: 11.5px; color: var(--text-2); width: 66px; text-align: right; flex-shrink: 0; }

/* 分页 */
.pager { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-top: 1px solid var(--line-soft); font-size: 12px; color: var(--text-3); }
.pager-btns { display: flex; gap: 5px; align-items: center; }
.pager-btns button { min-width: 28px; height: 28px; border-radius: 5px; border: 1px solid var(--line); background: #fff; font-size: 12px; padding: 0 8px; }
.pager-btns button:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.pager-btns button.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.pager-btns button:disabled { opacity: .5; cursor: not-allowed; }

/* Toast */
#toast-root { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 999; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  background: #111827; color: #fff; padding: 9px 16px; border-radius: 7px; font-size: 12.5px;
  box-shadow: var(--shadow-lg); animation: toastIn .2s ease; max-width: 70vw;
}
.toast.success { background: #14532D; }
.toast.error { background: #7F1D1D; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* 空状态 / 加载 */
.empty { padding: 46px 20px; text-align: center; color: var(--text-3); }
.empty svg { width: 42px; height: 42px; opacity: .35; margin-bottom: 10px; }
.empty p { font-size: 12.5px; }
.loading { padding: 40px; text-align: center; color: var(--text-3); font-size: 12.5px; }
.spinner {
  width: 18px; height: 18px; border: 2px solid var(--line); border-top-color: var(--primary);
  border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; vertical-align: -3px; margin-right: 7px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* 权限矩阵 */
.perm-group { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; margin-bottom: 10px; }
.perm-group-title { font-size: 12px; font-weight: 600; color: var(--text-2); margin-bottom: 8px; }
.perm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px 14px; }
.perm-grid label { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text-2); cursor: pointer; }
.perm-grid input { width: 14px; height: 14px; accent-color: var(--primary); }

/* 详情里的编辑区 */
.form-inline { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.form-inline .full { grid-column: 1 / -1; }
.form-inline input, .form-inline select, .form-inline textarea { width: 100%; height: 34px; border: 1px solid var(--line); border-radius: 6px; padding: 0 9px; outline: none; }
.form-inline textarea { height: auto; min-height: 62px; padding: 8px 9px; resize: vertical; }
.form-inline label { font-size: 11.5px; color: var(--text-3); display: block; margin-bottom: 4px; }

.hint-box { background: #F8FAFC; border: 1px solid var(--line-soft); border-radius: 8px; padding: 10px 12px; font-size: 11.5px; color: var(--text-3); line-height: 1.7; }
.warn-box { background: #FFFBEB; border: 1px solid #FDE68A; color: #92400E; border-radius: 8px; padding: 10px 12px; font-size: 12px; }

/* 响应式 */
@media (max-width: 1280px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-2-1 { grid-template-columns: 1fr; }
}
@media (max-width: 1080px) {
  .sidebar { width: 64px; }
  .brand { padding: 0 14px; justify-content: center; }
  .brand-text, .nav-item span:not(.nav-badge), .nav-group, .sidebar-foot span { display: none; }
  .nav-item { justify-content: center; padding: 0; }
  .nav-item.active::before { left: -10px; }
  .main { margin-left: 64px; }
  .login-left { display: none; }
  .drawer { width: 100%; }
}
