:root{
  --bg:#f4f6fb; --panel:#ffffff; --text:#1f2937; --muted:#6b7280;
  --primary:#2563eb; --primary-d:#1d4ed8; --border:#e5e7eb; --slate:#475569;
}
*{box-sizing:border-box; margin:0; padding:0;}
body{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;
  background:var(--bg); color:var(--text); font-size:14px; line-height:1.5;}
.hidden{display:none!important;}
.muted{color:var(--muted);}
.err{color:#dc2626; font-size:13px; margin-top:10px; min-height:18px;}

/* ---------- 登录 ---------- */
#login-view{min-height:100vh; display:flex; align-items:center; justify-content:center;
  background:linear-gradient(135deg,#2563eb,#4f46e5);}
.login-card{background:#fff; padding:34px 32px; border-radius:16px; width:360px; box-shadow:0 24px 50px rgba(0,0,0,.25);}
.login-brand{font-size:19px; font-weight:700; text-align:center;}
.login-sub{text-align:center; color:var(--muted); margin:6px 0 22px; font-size:13px;}
.demo-hint{margin-top:18px; padding:12px 14px; background:#f8fafc; border:1px dashed var(--border);
  border-radius:10px; font-size:12px; color:var(--slate); line-height:1.7;}

/* ---------- 布局 ---------- */
#app-view{display:flex; min-height:100vh;}
.sidebar{width:212px; background:#0f172a; color:#fff; display:flex; flex-direction:column;}
.sidebar .brand{padding:18px 20px; font-size:15px; font-weight:700; border-bottom:1px solid rgba(255,255,255,.1);}
.nav{flex:1; padding:12px 10px;}
.nav a{padding:10px 14px; display:block; color:#cbd5e1; text-decoration:none; border-radius:8px;
  margin-bottom:4px; cursor:pointer; font-size:14px;}
.nav a:hover{background:rgba(255,255,255,.08); color:#fff;}
.nav a.active{background:var(--primary); color:#fff;}
.main{flex:1; display:flex; flex-direction:column; min-width:0;}
.topbar{height:56px; background:#fff; border-bottom:1px solid var(--border); display:flex;
  align-items:center; justify-content:space-between; padding:0 24px;}
.user-box{display:flex; align-items:center; gap:12px; color:var(--slate);}
.content{padding:24px; overflow:auto; flex:1;}

/* ---------- 卡片 / 统计 ---------- */
.grid{display:grid; gap:16px;}
.stats{grid-template-columns:repeat(auto-fit,minmax(170px,1fr));}
.two{grid-template-columns:1fr 1fr;}
.card{background:var(--panel); border:1px solid var(--border); border-radius:12px; padding:18px;}
.card h3{font-size:15px; margin-bottom:12px;}
.card-head{display:flex; align-items:center; justify-content:space-between; margin-bottom:12px;}
.card-head h3{margin:0;}
.stat .num{font-size:30px; font-weight:700; line-height:1.1;}
.stat .lbl{color:var(--muted); margin-top:4px; font-size:13px;}

/* ---------- 表格 ---------- */
.table{width:100%; border-collapse:collapse; background:#fff; border-radius:10px; overflow:hidden;
  box-shadow:0 1px 3px rgba(0,0,0,.06);}
.table th,.table td{padding:11px 14px; text-align:left; border-bottom:1px solid var(--border); vertical-align:middle;}
.table th{background:#f8fafc; font-weight:600; color:var(--slate); font-size:13px; white-space:nowrap;}
.table tr:last-child td{border-bottom:none;}
.table tbody tr:hover{background:#f9fafb;}

/* ---------- 按钮 ---------- */
.btn{display:inline-flex; align-items:center; gap:6px; padding:8px 14px; border-radius:8px;
  border:1px solid var(--border); background:#fff; cursor:pointer; font-size:13px; color:var(--text);}
.btn:hover{background:#f1f5f9;}
.btn-primary{background:var(--primary); border-color:var(--primary); color:#fff;}
.btn-primary:hover{background:var(--primary-d);}
.btn-sm{padding:5px 10px; font-size:12px;}
.btn-danger{color:#dc2626; border-color:#fecaca;}
.btn-danger:hover{background:#fef2f2;}

/* ---------- 徽标 ---------- */
.badge{display:inline-block; padding:2px 10px; border-radius:999px; font-size:12px; font-weight:600;}

/* ---------- 表单 / 弹窗 ---------- */
.field{margin-bottom:12px;}
.field label{display:block; margin-bottom:5px; color:var(--muted); font-size:13px;}
.field input,.field select,.field textarea{width:100%; padding:9px 11px; border:1px solid var(--border);
  border-radius:8px; font-size:14px; font-family:inherit; background:#fff; color:var(--text);}
.field textarea{resize:vertical;}
.row2{display:grid; grid-template-columns:1fr 1fr; gap:12px;}
.modal-mask{position:fixed; inset:0; background:rgba(15,23,42,.5); display:flex; align-items:center;
  justify-content:center; z-index:50;}
.modal{background:#fff; border-radius:12px; width:500px; max-width:92vw; padding:22px 24px; max-height:90vh; overflow:auto;}
.modal h3{margin-bottom:16px;}
.modal-actions{display:flex; justify-content:flex-end; gap:10px; margin-top:10px;}

/* ---------- 提示 ---------- */
.toast{position:fixed; left:50%; bottom:40px; transform:translateX(-50%); background:#0f172a; color:#fff;
  padding:10px 18px; border-radius:8px; font-size:14px; z-index:100; box-shadow:0 8px 20px rgba(0,0,0,.2);}

/* ---------- 待核实提示条 ---------- */
.info-banner{background:#fffbeb; border:1px solid #fde68a; color:#92400e; padding:10px 14px;
  border-radius:8px; font-size:13px; margin-bottom:14px;}

/* ---------- 通知铃铛 ---------- */
.bell-wrap{position:relative;}
#bell-btn{position:relative; font-size:16px; padding:6px 10px;}
.badge-count{position:absolute; top:-4px; right:-4px; min-width:18px; height:18px; padding:0 4px;
  background:#dc2626; color:#fff; border-radius:999px; font-size:11px; line-height:18px; text-align:center; font-weight:700;}
.notif-panel{position:absolute; top:42px; right:0; width:320px; max-height:60vh; overflow:auto;
  background:#fff; border:1px solid var(--border); border-radius:12px; box-shadow:0 16px 40px rgba(0,0,0,.18); z-index:60;}
.notif-head{display:flex; align-items:center; justify-content:space-between; padding:10px 14px; border-bottom:1px solid var(--border); font-weight:600;}
.notif-item{padding:10px 14px; border-bottom:1px solid var(--border); cursor:pointer;}
.notif-item:hover{background:#f8fafc;}
.notif-item.unread{background:#eff6ff;}
.notif-title{font-weight:600; font-size:13px; margin-bottom:2px;}
.notif-body{font-size:12px; color:var(--text); line-height:1.5;}
.notif-time{font-size:11px; margin-top:4px;}
.notif-empty{padding:18px; text-align:center;}

/* ---------- 筛选栏 / 分页 ---------- */
.filter-bar{display:flex; gap:8px; flex-wrap:wrap; margin-bottom:14px;}
.filter-bar input, .filter-bar select{width:auto; min-width:150px; padding:7px 10px; border:1px solid var(--border);
  border-radius:8px; font-size:13px; background:#fff; color:var(--text);}
.filter-bar input#f-kw{flex:1; min-width:200px;}
.list-foot{display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:10px; margin-top:14px;}
.ps-control{font-size:13px; color:var(--muted); display:flex; align-items:center; gap:6px;}
.ps-control select, .ps-control input{padding:6px 8px; border:1px solid var(--border); border-radius:8px; font-size:13px;}
.pager{display:flex; align-items:center; gap:6px; flex-wrap:wrap; font-size:13px;}
.pager input{padding:5px 8px; border:1px solid var(--border); border-radius:8px; font-size:13px;}
.link{color:var(--primary); cursor:pointer; text-decoration:none;}
.link:hover{text-decoration:underline;}

/* ---------- 证据包 ---------- */
.ev-list{display:flex; flex-direction:column; gap:8px;}
.ev-item{display:flex; align-items:center; gap:12px; padding:8px 10px; border:1px solid var(--border); border-radius:8px; background:#fff;}
.ev-item .link{font-weight:600;}
.ev-upload{display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-top:12px;}

/* ---------- 日报多选 / 复选 ---------- */
.chk-group{display:flex; gap:16px; flex-wrap:wrap; margin-top:4px;}
.chk{display:inline-flex; align-items:center; gap:6px; font-size:14px; cursor:pointer;}
.chk input{width:auto; margin:0;}

/* ---------- 客户详情 / 时间线 ---------- */
.detail-info{display:grid; grid-template-columns:1fr 1fr; gap:8px 18px; background:#f8fafc;
  border:1px solid var(--border); border-radius:10px; padding:14px 16px; margin-bottom:6px;}
.detail-info > div{font-size:13px;}
.detail-info .muted{display:inline-block; width:52px; margin-right:8px; color:var(--muted);}
.timeline{max-height:40vh; overflow:auto; padding-left:4px;}
.tl-item{border-left:3px solid #cbd5e1; padding:8px 12px; margin-bottom:10px; background:#f8fafc; border-radius:0 8px 8px 0;}
.tl-item.tl-manual{border-left-color:var(--primary); background:#eff6ff;}
.tl-head{font-size:12px; margin-bottom:4px; display:flex; align-items:center; gap:8px;}
.tl-content{font-size:13px; line-height:1.5;}
