* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif; color: #303133; background: #f4f6f9; }

.layout { display: flex; min-height: 100vh; }
.aside { width: 220px; background: #1f2a44; color: #cdd5e5; flex-shrink: 0; }
.logo { color: #fff; font-weight: 700; font-size: 18px; padding: 18px; }
.menu { display: flex; flex-direction: column; }
.menu-item { color: #cdd5e5; text-decoration: none; padding: 12px 20px; font-size: 14px; }
.menu-item:hover { background: #2a3a5c; color: #fff; }
.menu-item.active { background: #2d6cdf; color: #fff; }

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.header { height: 56px; background: #fff; border-bottom: 1px solid #eee; display: flex; align-items: center; padding: 0 20px; }
.page-title { font-weight: 600; }
.spacer { flex: 1; }
.who { color: #666; margin-right: 12px; font-size: 14px; }
.link-btn { background: none; border: none; color: #2d6cdf; cursor: pointer; font-size: 14px; }
.content { padding: 20px; }

.cards { display: flex; gap: 16px; margin-bottom: 16px; }
.card { flex: 1; background: #fff; border-radius: 8px; padding: 20px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.num { font-size: 30px; font-weight: 700; color: #2d6cdf; }
.card-label { color: #888; margin-top: 6px; }

.panel { background: #fff; border-radius: 8px; padding: 16px 20px; margin-top: 16px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.panel-title { font-weight: 600; margin-bottom: 12px; }
.muted { color: #999; font-size: 13px; line-height: 1.7; }

.toolbar { display: flex; gap: 12px; margin-bottom: 12px; align-items: center; flex-wrap: wrap; }
table.tbl { width: 100%; border-collapse: collapse; background: #fff; font-size: 14px; }
table.tbl th, table.tbl td { border: 1px solid #ebeef5; padding: 8px 10px; text-align: left; vertical-align: middle; }
table.tbl th { background: #f5f7fa; font-weight: 600; color: #606266; }
table.tbl tr:hover td { background: #f8faff; }
.ellipsis { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.btn { border: 1px solid #dcdfe6; background: #fff; color: #606266; border-radius: 4px; padding: 6px 14px; cursor: pointer; font-size: 13px; }
.btn:hover { color: #2d6cdf; border-color: #c6d8ff; }
.btn.primary { background: #2d6cdf; border-color: #2d6cdf; color: #fff; }
.btn.primary:hover { background: #3b78e0; color: #fff; }
.btn.danger { color: #f56c6c; }
.btn.danger:hover { background: #fef0f0; border-color: #fbc4c4; }
.btn.warning { color: #e6a23c; }
.btn.warning:hover { background: #fdf6ec; border-color: #f5dab1; }
.btn.small { padding: 3px 9px; font-size: 12px; }
.btn.block { width: 100%; padding: 9px; font-size: 15px; }
.btn + .btn { margin-left: 6px; }
.btn:disabled { color: #c0c4cc; cursor: not-allowed; border-color: #ebeef5; }

.field { margin-bottom: 12px; }
.field > label { display: block; font-size: 13px; color: #606266; margin-bottom: 4px; }
.field input, .field select, .field textarea { width: 100%; padding: 7px 10px; border: 1px solid #dcdfe6; border-radius: 4px; font-size: 14px; font-family: inherit; }
.field textarea { resize: vertical; }
.field .hint { font-size: 12px; color: #909399; line-height: 1.6; margin-top: 4px; }
.field .hint code { background: #f5f7fa; padding: 0 4px; border-radius: 3px; }
.field .hint ul { margin: 4px 0 0; padding-left: 18px; }
.inline { display: flex; align-items: center; gap: 8px; }
.switch { position: relative; display: inline-block; width: 46px; height: 24px; }
.switch input { display: none; }
.switch .slider { position: absolute; inset: 0; background: #c0c4cc; border-radius: 24px; transition: .2s; }
.switch .slider::before { content: ""; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; }
.switch input:checked + .slider { background: #2d6cdf; }
.switch input:checked + .slider::before { transform: translateX(22px); }

.tag { display: inline-block; padding: 1px 8px; border-radius: 4px; font-size: 12px; }
.tag.success { background: #f0f9eb; color: #67c23a; }
.tag.info { background: #f4f4f5; color: #909399; }
.tag.danger { background: #fef0f0; color: #f56c6c; }
.tag.warning { background: #fdf6ec; color: #e6a23c; }

.pager { display: flex; gap: 6px; margin-top: 12px; align-items: center; }
.pager button { border: 1px solid #dcdfe6; background: #fff; border-radius: 4px; padding: 4px 10px; cursor: pointer; }
.pager button:disabled { color: #c0c4cc; cursor: not-allowed; }
.pager .info { color: #909399; font-size: 13px; margin-left: 8px; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid #e4e7ed; margin-bottom: 16px; }
.tab { padding: 10px 16px; cursor: pointer; color: #606266; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab.on { color: #2d6cdf; border-bottom-color: #2d6cdf; }

.seg button { border: 1px solid #dcdfe6; background: #fff; padding: 4px 10px; cursor: pointer; font-size: 12px; }
.seg button.on { background: #2d6cdf; color: #fff; border-color: #2d6cdf; }
.seg button:first-child { border-radius: 4px 0 0 4px; }
.seg button:last-child { border-radius: 0 4px 4px 0; }

.sub-row { display: flex; align-items: center; margin: 10px 0; }
.sub-name { width: 80px; color: #555; font-size: 14px; flex-shrink: 0; }
.sub-bar { flex: 1; height: 14px; background: #f0f2f5; border-radius: 7px; margin: 0 12px; overflow: hidden; }
.sub-bar > i { display: block; height: 100%; background: #2d6cdf; }
.sub-val { width: 44px; color: #606266; font-size: 13px; text-align: right; }

.alert { border-radius: 4px; padding: 10px 14px; font-size: 13px; margin-top: 12px; }
.alert.success { background: #f0f9eb; color: #67c23a; }
.alert.warning { background: #fdf6ec; color: #e6a23c; }
.alert.info { background: #edf2fc; color: #606266; }

.chart { width: 100%; height: 300px; display: block; }
.chart .grid { stroke: #eee; stroke-width: 1; }
.chart .ylabel, .chart .xlabel { fill: #999; font-size: 11px; }
.legend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.legend-item { display: inline-flex; align-items: center; font-size: 12px; color: #555; }
.legend-item .dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-right: 4px; }

.login-wrap { height: 100vh; display: flex; align-items: center; justify-content: center; background: #1f2a44; }
.login-card { width: 360px; background: #fff; border-radius: 8px; padding: 28px; box-shadow: 0 6px 24px rgba(0,0,0,.2); }
.login-card h2 { text-align: center; margin: 0 0 18px; }
.login-card .tip { color: #999; font-size: 12px; text-align: center; margin-top: 12px; }

.toast { position: fixed; top: 20px; left: 50%; transform: translateX(-50%) translateY(-20px); background: #303133; color: #fff; padding: 10px 18px; border-radius: 4px; font-size: 14px; opacity: 0; pointer-events: none; transition: all .25s; z-index: 3000; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.error { background: #f56c6c; }
.toast.success { background: #67c23a; }

.modal-mask { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: none; align-items: flex-start; justify-content: center; z-index: 2000; }
.modal-mask.show { display: flex; }
.modal { background: #fff; border-radius: 8px; width: 560px; max-width: 92vw; margin-top: 7vh; max-height: 86vh; display: flex; flex-direction: column; }
.modal.wide { width: 66vw; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid #eee; font-weight: 600; }
.modal-x { background: none; border: none; font-size: 22px; cursor: pointer; color: #909399; line-height: 1; }
.modal-body { padding: 20px; overflow: auto; }
.modal-foot { padding: 12px 20px; border-top: 1px solid #eee; text-align: right; }
pre.md { white-space: pre-wrap; word-break: break-word; background: #f7f8fa; padding: 14px; border-radius: 6px; font-size: 13px; line-height: 1.6; }
