* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; background: #f4f6fa; color: #1f2733; font-size: 14px; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: 14px; padding: 8px 10px; border: 1px solid #d6dce6; border-radius: 6px; outline: none; width: 100%; }
input:focus, select:focus, textarea:focus { border-color: #3b6df0; }

/* 登录 */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #1e2a4a, #2d4a8a); }
.login-card { width: 360px; background: #fff; border-radius: 14px; padding: 36px 32px; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.login-card h1 { font-size: 22px; text-align: center; color: #1e2a4a; }
.login-sub { text-align: center; color: #8a93a6; margin: 8px 0 24px; font-size: 12px; }
#login-form { display: flex; flex-direction: column; gap: 14px; }
#login-btn { background: #3b6df0; color: #fff; border: none; padding: 11px; border-radius: 8px; font-size: 15px; font-weight: 600; }
#login-btn:hover { background: #2f5bd0; }
.login-error { color: #e04646; font-size: 13px; min-height: 18px; }
.login-hint { margin-top: 16px; font-size: 12px; color: #8a93a6; text-align: center; line-height: 1.6; }

/* 主框架 */
.main-wrap { display: flex; min-height: 100vh; }
.sidebar { width: 220px; background: #1e2a4a; color: #cdd6ea; display: flex; flex-direction: column; }
.brand { padding: 20px 18px; font-size: 17px; font-weight: 700; color: #fff; border-bottom: 1px solid #2c3a5e; }
.sidebar nav { padding: 10px 0; flex: 1; }
.nav-item { padding: 11px 20px; cursor: pointer; color: #b7c1d8; display: flex; align-items: center; gap: 8px; }
.nav-item:hover { background: #28365c; color: #fff; }
.nav-item.active { background: #3b6df0; color: #fff; }
.nav-sep { height: 1px; background: #2c3a5e; margin: 8px 14px; }
.nav-group-title { padding: 12px 20px 4px; font-size: 11px; color: #6f7c9c; letter-spacing: 1px; }

.content { flex: 1; display: flex; flex-direction: column; }
.topbar { height: 56px; background: #fff; border-bottom: 1px solid #e6eaf1; display: flex; align-items: center; justify-content: space-between; padding: 0 22px; }
.crumb { font-size: 16px; font-weight: 600; }
.userbox { display: flex; align-items: center; gap: 12px; color: #5a6478; }
.btn-ghost { background: transparent; border: 1px solid #d6dce6; padding: 6px 12px; border-radius: 6px; color: #5a6478; }
.btn-ghost:hover { border-color: #3b6df0; color: #3b6df0; }
.page { padding: 22px; overflow: auto; flex: 1; }

/* 工具栏 */
.toolbar { display: flex; gap: 10px; margin-bottom: 14px; align-items: center; flex-wrap: wrap; }
.btn-primary { background: #3b6df0; color: #fff; border: none; padding: 8px 16px; border-radius: 7px; font-weight: 600; }
.btn-primary:hover { background: #2f5bd0; }
.btn-sm { padding: 5px 10px; font-size: 13px; border-radius: 6px; border: 1px solid #d6dce6; background: #fff; color: #3b6df0; }
.btn-sm:hover { background: #eef3ff; }
.btn-danger { color: #e04646; border-color: #f0caca; }
.btn-danger:hover { background: #fdecec; }
.search-input { width: 240px; }

/* 卡片/统计 */
.cards { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.card { background: #fff; border-radius: 10px; padding: 18px 20px; box-shadow: 0 1px 4px rgba(20,30,60,.06); flex: 1; min-width: 150px; }
.card .num { font-size: 26px; font-weight: 700; color: #1e2a4a; }
.card .lbl { color: #8a93a6; margin-top: 4px; font-size: 13px; }

/* 表格 */
.table-wrap { background: #fff; border-radius: 10px; box-shadow: 0 1px 4px rgba(20,30,60,.06); overflow: hidden; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 11px 14px; text-align: left; border-bottom: 1px solid #eef1f6; font-size: 13px; }
th { background: #f7f9fc; color: #6b7589; font-weight: 600; }
tr:hover td { background: #fafbff; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 12px; background: #eef3ff; color: #3b6df0; }
.tag.green { background: #e7f7ee; color: #1f9d57; }
.tag.red { background: #fdecec; color: #e04646; }
.tag.gray { background: #f0f2f6; color: #8a93a6; }
.tag.gold { background: #fff4e0; color: #c98a1a; }
.row-actions { display: flex; gap: 6px; }
.empty { padding: 40px; text-align: center; color: #9aa3b5; }

/* 弹窗 */
.modal-mask { position: fixed; inset: 0; background: rgba(20,28,48,.45); display: flex; align-items: center; justify-content: center; z-index: 50; }
.modal { background: #fff; border-radius: 12px; width: 520px; max-width: 92vw; max-height: 88vh; overflow: auto; padding: 22px 24px; }
.modal h3 { margin-bottom: 16px; font-size: 17px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.form-field { display: flex; flex-direction: column; gap: 5px; }
.form-field.full { grid-column: 1 / -1; }
.form-field label { font-size: 12px; color: #6b7589; }
.form-field .hint { font-size: 11px; color: #9aa3b5; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.banner { padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; font-size: 13px; }
.banner.warn { background: #fff4e0; color: #c98a1a; }
.banner.error { background: #fdecec; color: #e04646; }
.banner.info { background: #eef3ff; color: #3b6df0; }
