* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; background: #f4f6fa; color: #1f2533; font-size: 14px; }
a { color: #2b6cff; text-decoration: none; }

/* 登录 */
.login-wrap { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg,#1f2a44,#2b6cff); }
.login-box { width: 340px; background: #fff; border-radius: 16px; padding: 36px 30px; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.login-box h1 { font-size: 22px; text-align: center; }
.login-box .sub { text-align: center; color: #888; margin: 6px 0 22px; }
.login-box input { width: 100%; padding: 12px 14px; border: 1px solid #dfe3ea; border-radius: 10px; margin-bottom: 14px; font-size: 14px; }
.login-box .btn { width: 100%; }
.msg { text-align: center; color: #e23; min-height: 20px; margin-top: 8px; }
.hint { text-align: center; color: #aaa; font-size: 12px; margin-top: 14px; }

/* 布局 */
.app { display: flex; min-height: 100vh; }
.sidebar { width: 210px; background: #1f2a44; color: #cfd6e6; display: flex; flex-direction: column; position: fixed; top: 0; bottom: 0; left: 0; }
.sidebar .logo { padding: 18px 18px; font-weight: 800; font-size: 18px; color: #fff; border-bottom: 1px solid #2c3a5c; }
.sidebar nav { flex: 1; overflow-y: auto; padding: 8px 0; }
.nav-sec { padding: 12px 18px 4px; font-size: 11px; color: #6b7894; letter-spacing: 1px; }
.nav-item { display: block; padding: 10px 18px; color: #cfd6e6; cursor: pointer; border-left: 3px solid transparent; }
.nav-item:hover { background: #283655; }
.nav-item.active { background: #2b6cff; color: #fff; border-left-color: #ffd34d; }
.side-foot { padding: 12px 18px; border-top: 1px solid #2c3a5c; font-size: 12px; display: flex; justify-content: space-between; }

.content { margin-left: 210px; flex: 1; padding: 22px 28px; }
.crumb { font-size: 13px; color: #888; margin-bottom: 14px; }
.view h2 { font-size: 19px; margin-bottom: 16px; }

/* 卡片/工具条 */
.card { background: #fff; border-radius: 12px; padding: 18px; box-shadow: 0 2px 10px rgba(20,30,60,.05); margin-bottom: 16px; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; align-items: center; }
.toolbar .spacer { flex: 1; }

/* 按钮 */
.btn { padding: 9px 16px; border: none; border-radius: 9px; background: #eef1f7; color: #1f2533; cursor: pointer; font-size: 13px; }
.btn:hover { background: #e3e8f2; }
.btn.primary { background: #2b6cff; color: #fff; }
.btn.primary:hover { background: #1d5bf0; }
.btn.danger { background: #ffecec; color: #e23; }
.btn.ghost { background: transparent; border: 1px solid #ccd3e0; }
.btn.sm { padding: 5px 11px; font-size: 12px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* 表格 */
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 12px; overflow: hidden; }
th, td { padding: 11px 12px; text-align: left; border-bottom: 1px solid #eef1f7; font-size: 13px; vertical-align: middle; }
th { background: #f7f9fc; color: #5a6ava; font-weight: 700; color: #5a667e; }
tr:last-child td { border-bottom: none; }
.tag { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 12px; }
.tag.ok { background: #e7f8ee; color: #1a9c54; }
.tag.warn { background: #fff4e0; color: #d98300; }
.tag.bad { background: #ffecec; color: #e23; }
.tag.info { background: #eaf1ff; color: #2b6cff; }
.tag.gray { background: #eef1f7; color: #777; }

/* 表单 */
.form-grid { display: grid; grid-template-columns: 140px 1fr; gap: 12px 14px; align-items: center; max-width: 760px; }
.form-grid label { color: #5a667e; }
.form-grid input, .form-grid select, .form-grid textarea { width: 100%; padding: 9px 12px; border: 1px solid #dfe3ea; border-radius: 9px; font-size: 14px; font-family: inherit; }
.form-grid textarea { min-height: 72px; resize: vertical; }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.muted { color: #8a93a6; }
.empty { text-align: center; color: #9aa3b5; padding: 40px 0; }
.stat-row { display: flex; gap: 14px; flex-wrap: wrap; }
.stat { flex: 1; min-width: 150px; background: #fff; border-radius: 12px; padding: 18px; box-shadow: 0 2px 10px rgba(20,30,60,.05); }
.stat .num { font-size: 26px; font-weight: 800; color: #2b6cff; }
.stat .lbl { color: #8a93a6; margin-top: 6px; }

/* 弹层 */
.modal-mask { position: fixed; inset: 0; background: rgba(15,22,40,.5); display: flex; align-items: center; justify-content: center; z-index: 50; }
.modal { width: 560px; max-width: 92vw; max-height: 88vh; overflow-y: auto; background: #fff; border-radius: 14px; padding: 22px 24px; }
.modal h3 { margin-bottom: 16px; }
.modal .foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

.pager { display: flex; gap: 8px; align-items: center; margin-top: 12px; }
.pager button { padding: 6px 12px; }
.pager .cur { background: #2b6cff; color: #fff; border-radius: 8px; padding: 6px 12px; }
.kv { display: grid; grid-template-columns: 160px 1fr; gap: 10px 14px; }
.kv .k { color: #8a93a6; }
.thumb { width: 46px; height: 64px; object-fit: cover; border-radius: 6px; }
.banner { background: #fff7e6; border: 1px solid #ffe0a3; color: #9a6a00; padding: 10px 14px; border-radius: 10px; margin-bottom: 14px; font-size: 13px; }
