* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: "Microsoft YaHei", "PingFang SC", sans-serif; background: #f2f4f7; color: #2b3440; font-size: 14px; }
.hidden { display: none !important; }
.muted { color: #8a94a3; }
.error { color: #d4380d; }
.spacer { flex: 1; }

/* 登录 */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.login-box { background: #fff; padding: 36px 40px; border-radius: 10px; width: 340px; box-shadow: 0 8px 30px rgba(0,0,0,.08); text-align: center; }
.login-box h1 { font-size: 20px; margin-bottom: 6px; }
.login-box p { margin-bottom: 20px; }
.login-box input { display: block; width: 100%; padding: 10px 12px; margin-bottom: 14px; border: 1px solid #d5dbe3; border-radius: 6px; font-size: 14px; }
.login-box .error { margin-top: 10px; min-height: 18px; }

/* 顶栏 */
.topbar { display: flex; align-items: center; gap: 10px; background: #1f3a5f; color: #fff; padding: 0 18px; height: 52px; position: sticky; top: 0; z-index: 10; }
.topbar .logo { font-size: 16px; font-weight: 600; margin-right: 12px; white-space: nowrap; }
.topbar nav { display: flex; gap: 2px; overflow-x: auto; }
.topbar nav button { background: none; border: none; color: #c8d4e4; padding: 16px 14px; cursor: pointer; font-size: 14px; white-space: nowrap; border-bottom: 3px solid transparent; }
.topbar nav button.active { color: #fff; border-bottom-color: #4d9fff; }
.topbar .muted { color: #9fb2cc; }
.topbar .btn { background: rgba(255,255,255,.12); color: #fff; border: none; }
.topbar .btn:hover { background: rgba(255,255,255,.24); }

main { max-width: 1200px; margin: 20px auto; padding: 0 16px; }
.panel { background: #fff; border-radius: 8px; padding: 18px 20px; margin-bottom: 16px; box-shadow: 0 1px 3px rgba(0,0,0,.05); }
.panel h2 { font-size: 16px; margin-bottom: 14px; }
.panel h3 { font-size: 14px; margin: 16px 0 8px; }

/* 按钮与表单 */
.btn { border: 1px solid #d5dbe3; background: #fff; padding: 6px 14px; border-radius: 6px; cursor: pointer; font-size: 13px; color: #2b3440; }
.btn:hover { border-color: #4d9fff; color: #1877d2; }
.btn.primary { background: #1877d2; border-color: #1877d2; color: #fff; }
.btn.primary:hover { background: #3a91e6; }
.btn.danger { color: #d4380d; }
.btn.small { padding: 3px 10px; font-size: 12px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

input[type=text], input[type=password], input[type=number], select, textarea { padding: 7px 10px; border: 1px solid #d5dbe3; border-radius: 6px; font-size: 13px; font-family: inherit; background: #fff; }
textarea { resize: vertical; }
label.field { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: #5a6472; margin-bottom: 12px; }
.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar .spacer { flex: 1; }

/* 表格 */
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid #edf0f4; vertical-align: middle; }
th { background: #f7f9fb; color: #5a6472; font-weight: 600; white-space: nowrap; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: #f5f9ff; }

/* 徽标 */
.badge { display: inline-block; padding: 2px 9px; border-radius: 10px; font-size: 12px; margin: 1px 2px; white-space: nowrap; }
.badge.lead { background: #e6f4ff; color: #1877d2; }
.badge.assist { background: #f6ffed; color: #389e0d; }
.badge.todo { background: #fff7e6; color: #d46b08; }
.badge.done { background: #f6ffed; color: #389e0d; }
.badge.pending { background: #fff1f0; color: #cf1322; }
.badge.high { background: #f6ffed; color: #389e0d; }
.badge.medium { background: #fff7e6; color: #d46b08; }
.badge.low { background: #fff1f0; color: #cf1322; }
.badge.manual { background: #f5f5f5; color: #666; }

/* 工作台 */
.dept-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
.asg-card { background: #fff; border-radius: 8px; padding: 14px 16px; box-shadow: 0 1px 3px rgba(0,0,0,.05); border-left: 4px solid #1877d2; }
.asg-card.done { border-left-color: #52c41a; opacity: .75; }
.asg-card h4 { font-size: 14px; margin-bottom: 6px; }
.asg-card .meta { font-size: 12px; color: #8a94a3; margin-bottom: 8px; }
.asg-card .actions { display: flex; gap: 8px; }

/* 提交工作 */
.form-grid { display: grid; grid-template-columns: 1fr 220px 220px; gap: 12px; }
.preview-box { background: #f7f9fb; border: 1px dashed #c9d4e0; border-radius: 8px; padding: 14px 16px; margin-top: 6px; }
.preview-box .step { margin-bottom: 12px; }
.preview-box .step:last-child { margin-bottom: 0; }
.preview-line { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13px; }
.hit-detail { color: #8a94a3; font-size: 12px; margin-top: 3px; }

/* 弹窗 */
.modal-wrap { position: fixed; inset: 0; background: rgba(20,30,45,.45); display: flex; align-items: flex-start; justify-content: center; padding: 60px 16px; z-index: 100; }
.modal { background: #fff; border-radius: 10px; width: 720px; max-width: 100%; max-height: 82vh; display: flex; flex-direction: column; }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid #edf0f4; font-weight: 600; }
.modal-body { padding: 16px 18px; overflow-y: auto; }

.toast { position: fixed; top: 66px; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,.78); color: #fff; padding: 9px 22px; border-radius: 6px; z-index: 200; font-size: 13px; }
.toast.err { background: rgba(207,19,34,.92); }

.stat-cards { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.stat-card { background: #fff; border-radius: 8px; padding: 16px 22px; box-shadow: 0 1px 3px rgba(0,0,0,.05); min-width: 150px; }
.stat-card .num { font-size: 26px; font-weight: 700; color: #1f3a5f; }
.stat-card .lbl { font-size: 12px; color: #8a94a3; }

.step-row { display: grid; grid-template-columns: 30px 1fr 1.4fr 130px 40px; gap: 8px; margin-bottom: 8px; align-items: center; }
.empty { text-align: center; color: #8a94a3; padding: 30px 0; }
