/* 客迹CRM 一期样式：商务蓝白，响应式 */
* { margin:0; padding:0; box-sizing:border-box; }
body { font-family:-apple-system,"PingFang SC","HarmonyOS Sans SC","Microsoft YaHei",sans-serif; background:#f0f3f8; color:#2b2f36; font-size:14px; }
.hidden { display:none !important; }
.btn { border:none; border-radius:8px; padding:8px 16px; cursor:pointer; font-size:14px; background:#e5e9f2; color:#2b2f36; }
.btn.primary { background:#2563eb; color:#fff; }
.btn.danger { background:#fee2e2; color:#b91c1c; }
.btn.ghost { background:transparent; border:1px solid #cbd5e1; }
.btn.sm { padding:4px 10px; font-size:12px; }
.btn.block { width:100%; }
input,select,textarea { width:100%; border:1px solid #d3dbe8; border-radius:8px; padding:9px 12px; font-size:14px; margin:6px 0; background:#fff; }
input:focus,select:focus,textarea:focus { outline:none; border-color:#2563eb; }
.err { color:#dc2626; font-size:13px; margin-top:8px; }
.hint { color:#64748b; font-size:12px; }

/* 登录 */
.login-page { min-height:100vh; display:flex; align-items:center; justify-content:center; background:linear-gradient(135deg,#1e3a8a,#3b82f6); }
.login-box { background:#fff; border-radius:16px; padding:36px 32px; width:340px; box-shadow:0 20px 50px rgba(0,0,0,.25); }
.login-logo { font-size:32px; font-weight:800; color:#1e3a8a; text-align:center; letter-spacing:6px; }
.login-sub { text-align:center; color:#64748b; font-size:12px; margin:8px 0 20px; }

/* 布局 */
.layout { display:flex; min-height:100vh; }
.sidebar { width:200px; background:#152238; color:#cbd5e1; display:flex; flex-direction:column; flex:none; }
.side-logo { padding:20px 18px; font-size:20px; font-weight:700; color:#fff; border-bottom:1px solid rgba(255,255,255,.08); }
.side-logo span { display:block; font-size:11px; font-weight:400; color:#7dd3fc; margin-top:4px; }
nav { flex:1; padding:10px 0; }
nav a { display:block; padding:11px 20px; color:#cbd5e1; text-decoration:none; cursor:pointer; font-size:14px; }
nav a.active, nav a:hover { background:rgba(59,130,246,.18); color:#fff; border-right:3px solid #3b82f6; }
nav a .badge { background:#ef4444; color:#fff; border-radius:999px; font-size:11px; padding:1px 7px; margin-left:6px; }
.side-user #logoutBtn { background:rgba(255,255,255,.16); border:1px solid rgba(255,255,255,.55); color:#fff; font-weight:600; }
.side-user #logoutBtn:hover { background:rgba(255,255,255,.28); }
.side-user { padding:14px 18px; border-top:1px solid rgba(255,255,255,.08); font-size:13px; display:flex; justify-content:space-between; align-items:center; gap:6px; }
.content { flex:1; padding:22px; overflow-x:auto; }

/* 页面元素 */
.page-title { font-size:19px; font-weight:700; margin-bottom:16px; display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:10px; }
.toolbar { display:flex; gap:10px; margin-bottom:14px; flex-wrap:wrap; }
.toolbar input, .toolbar select { width:auto; margin:0; }
table.grid { width:100%; border-collapse:collapse; background:#fff; border-radius:12px; overflow:hidden; box-shadow:0 2px 8px rgba(30,58,138,.06); }
.grid th { background:#eff6ff; color:#1e3a8a; text-align:left; padding:10px 12px; font-size:13px; white-space:nowrap; }
.grid td { padding:10px 12px; border-top:1px solid #eef1f6; font-size:13.5px; }
.tag { display:inline-block; border-radius:6px; padding:2px 8px; font-size:12px; }
.tag.pool { background:#fef3c7; color:#92400e; }
.tag.private { background:#dbeafe; color:#1d4ed8; }
.tag.ok { background:#dcfce7; color:#166534; }
.tag.gray { background:#e2e8f0; color:#475569; }
.cards { display:grid; grid-template-columns:repeat(4,1fr); gap:14px; margin-bottom:20px; }
@media (max-width:760px){ .cards { grid-template-columns:repeat(2,1fr); } }
.stat-card { background:#fff; border-radius:14px; padding:18px; box-shadow:0 2px 8px rgba(30,58,138,.06); }
.stat-card .num { font-size:28px; font-weight:800; color:#1e3a8a; }
.stat-card .lbl { color:#64748b; font-size:13px; margin-top:4px; }
.timeline { list-style:none; }
.timeline li { background:#fff; border-radius:12px; padding:14px 16px; margin-bottom:10px; box-shadow:0 2px 8px rgba(30,58,138,.05); }
.timeline .meta { color:#64748b; font-size:12px; margin-bottom:6px; display:flex; gap:10px; flex-wrap:wrap; }
.timeline .approval { background:#f0fdf4; border-left:3px solid #22c55e; border-radius:8px; padding:8px 12px; margin-top:8px; font-size:13px; }
.timeline .logtip { color:#94a3b8; font-size:12px; margin-top:6px; }
.noti { background:#fff; border-radius:12px; padding:13px 16px; margin-bottom:9px; box-shadow:0 2px 8px rgba(30,58,138,.05); display:flex; justify-content:space-between; gap:10px; align-items:center; }
.noti.unread { border-left:4px solid #2563eb; background:#f8faff; }

/* 弹窗 */
.modal-mask { position:fixed; inset:0; background:rgba(15,23,42,.45); display:flex; align-items:center; justify-content:center; z-index:50; padding:16px; }
.modal { background:#fff; border-radius:16px; padding:22px; width:100%; max-width:520px; max-height:88vh; overflow-y:auto; }
.modal h3 { margin-bottom:12px; }
.form-row label { font-size:13px; color:#475569; display:block; }
.form-row .field-err { color:#dc2626; font-size:12px; min-height:14px; }
.modal .actions { display:flex; justify-content:flex-end; gap:10px; margin-top:14px; }

.toast { position:fixed; top:18px; left:50%; transform:translateX(-50%); background:#1e293b; color:#fff; padding:10px 20px; border-radius:10px; z-index:99; font-size:14px; }
.toast.error { background:#b91c1c; }

@media (max-width:760px){
  .layout { flex-direction:column; }
  .sidebar { width:100%; flex-direction:row; align-items:center; }
  .side-logo { padding:12px 14px; border-bottom:none; font-size:16px; }
  .side-logo span { display:inline; margin-left:6px; }
  nav { display:flex; flex-wrap:wrap; padding:0; flex:1; }
  nav a { padding:9px 12px; border-right:none; font-size:13px; }
  nav a.active, nav a:hover { border-right:none; }
  .side-user { border-top:none; padding:8px; }
  .content { padding:14px; }
  .grid { display:block; overflow-x:auto; }
}

.scroll6 { overflow-y: auto !important; }
