* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: "Microsoft YaHei", "PingFang SC", sans-serif; background: #f5f7fa; color: #303133; }

/* 登录页 */
.login-wrap { display: flex; align-items: center; justify-content: center; min-height: 100vh;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.login-card { background: #fff; border-radius: 12px; padding: 40px; width: 380px;
  box-shadow: 0 12px 40px rgba(0,0,0,.18); }
.login-card h1 { font-size: 22px; margin-bottom: 6px; }
.login-card .sub { color: #909399; font-size: 13px; margin-bottom: 28px; }

input, select, textarea { width: 100%; padding: 10px 12px; border: 1px solid #dcdfe6;
  border-radius: 6px; font-size: 14px; margin-bottom: 14px; outline: none; }
input:focus, textarea:focus { border-color: #409eff; }
button { padding: 9px 18px; border: none; border-radius: 6px; background: #409eff;
  color: #fff; cursor: pointer; font-size: 14px; }
button:hover { opacity: .88; }
button.ghost { background: #fff; color: #409eff; border: 1px solid #409eff; }
button.danger { background: #f56c6c; }
button.small { padding: 4px 10px; font-size: 12px; }
button:disabled { background: #c0c4cc; cursor: not-allowed; }

/* 布局 */
.layout { display: flex; min-height: 100vh; }
.sidebar { width: 210px; background: #001529; color: #fff; padding: 18px 0; flex-shrink: 0; }
.sidebar .brand { font-size: 17px; font-weight: bold; padding: 0 20px 18px; border-bottom: 1px solid #ffffff22; }
.sidebar .me { font-size: 12px; color: #9fb3c8; padding: 10px 20px; }
.nav-item { padding: 12px 20px; cursor: pointer; font-size: 14px; color: #c9d6e3; }
.nav-item:hover, .nav-item.on { background: #1890ff; color: #fff; }
.main { flex: 1; padding: 24px; overflow-x: auto; }
.page-title { font-size: 19px; font-weight: 600; margin-bottom: 16px; }

.card { background: #fff; border-radius: 8px; padding: 18px; margin-bottom: 18px;
  box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.card h3 { font-size: 15px; margin-bottom: 12px; }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 8px 10px; border-bottom: 1px solid #ebeef5; text-align: left; }
th { background: #fafafa; color: #606266; font-weight: 600; white-space: nowrap; }
tr:hover td { background: #f5f7fa; }

.tag { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 12px; }
.tag.green { background: #f0f9eb; color: #67c23a; }
.tag.orange { background: #fdf6ec; color: #e6a23c; }
.tag.red { background: #fef0f0; color: #f56c6c; }
.tag.blue { background: #ecf5ff; color: #409eff; }
.tag.gray { background: #f4f4f5; color: #909399; }

.progress { height: 14px; background: #ebeef5; border-radius: 7px; overflow: hidden; min-width: 100px; }
.progress > div { height: 100%; background: #67c23a; transition: width .3s; }
.progress > div.warn { background: #e6a23c; }
.progress > div.over { background: #f56c6c; }

.form-row { display: flex; gap: 12px; flex-wrap: wrap; }
.form-row > * { flex: 1; min-width: 160px; }
.muted { color: #909399; font-size: 12px; }
.mt10 { margin-top: 10px; } .mt20 { margin-top: 20px; }

/* 链接详情抽屉 */
.drawer-mask { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 100; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: 720px; max-width: 92vw;
  background: #fff; z-index: 101; padding: 22px; overflow-y: auto;
  box-shadow: -4px 0 16px rgba(0,0,0,.12); }
.chart { width: 100%; height: 320px; }
.chart-note { font-size: 12px; color: #606266; background: #f8f9fb; border-left: 3px solid #409eff;
  padding: 8px 12px; margin: 6px 0 16px; line-height: 1.7; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.stat-box { background: #f8f9fb; border-radius: 8px; padding: 14px; }
.stat-box .v { font-size: 22px; font-weight: 700; }
.stat-box .k { font-size: 12px; color: #909399; margin-top: 4px; }

.mono { font-family: Consolas, monospace; font-size: 12px; }
.close-x { float: right; cursor: pointer; font-size: 20px; color: #909399; }
