/* SlipCode WorkAdmin 样式 */

:root {
  --bg: #f2f5fb;
  --panel: #ffffff;
  --ink: #1f2937;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei',
    'Segoe UI', sans-serif;
  background: var(--bg);
  color: #1f2937;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0; font-weight: 600; }

#app { min-height: 100vh; }

/* ---------------------------------------------------------------- 登录 */

.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(1200px 600px at 15% 10%, rgba(64, 128, 255, 0.28), transparent 60%),
    radial-gradient(900px 500px at 90% 90%, rgba(120, 60, 255, 0.25), transparent 60%),
    #0d1526;
  padding: 24px;
}

.login-card {
  width: 410px;
  max-width: 100%;
  padding: 36px 32px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}

.brand-block { display: flex; align-items: center; gap: 14px; }

.brand-logo {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #3b82f6, #7c3aed);
}

.brand-block h1 { font-size: 20px; }
.brand-sub { margin: 2px 0 0; font-size: 12px; color: #8a94a6; letter-spacing: 0.4px; }

.login-card .el-form { margin-top: 26px; }
.login-btn { width: 100%; margin-top: 16px; letter-spacing: 4px; }
.login-tip { margin: 18px 0 0; font-size: 12px; color: #94a3b8; line-height: 1.6; }

/* ---------------------------------------------------------------- 布局 */

.layout { display: flex; min-height: 100vh; }

.sidebar {
  width: 232px;
  flex: 0 0 232px;
  background: #0d1526;
  color: #cbd5e1;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar .brand-block { padding: 22px 20px 18px; }
.sidebar h1 { font-size: 17px; color: #fff; }
.sidebar .menu { border: none; background: transparent; flex: 1; padding: 8px 10px; }
.sidebar .menu .el-menu-item {
  color: #a9b4c6;
  height: 46px;
  border-radius: 10px;
  margin-bottom: 4px;
}
.sidebar .menu .el-menu-item:hover { background: rgba(255, 255, 255, 0.07); color: #fff; }
.sidebar .menu .el-menu-item.is-active {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.9), rgba(124, 58, 237, 0.9));
  color: #fff;
}

.sidebar-footer {
  padding: 14px 20px;
  font-size: 12px;
  color: #8a94a6;
  display: flex;
  align-items: center;
  gap: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.sidebar-footer .logout { margin-left: auto; color: #93c5fd; }

.dot { width: 8px; height: 8px; border-radius: 50%; background: #64748b; }
.dot.ok { background: #34d399; box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.15); }
.dot.bad { background: #f87171; box-shadow: 0 0 0 4px rgba(248, 113, 113, 0.15); }

.main { flex: 1; padding: 28px 32px 48px; min-width: 0; }
.panel { max-width: 1180px; margin: 0 auto; }

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.panel-head h2 { font-size: 22px; }
.panel-head p { margin: 6px 0 0; font-size: 13px; color: #7b8496; }

/* ---------------------------------------------------------------- 卡片 */

.card {
  background: #fff;
  border-radius: 16px;
  padding: 20px 22px;
  margin-bottom: 18px;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.06);
  border: 1px solid rgba(15, 23, 42, 0.04);
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.card-head h3 { font-size: 15px; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.stat-card {
  background: #fff;
  border-radius: 16px;
  padding: 20px 22px;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.06);
  border: 1px solid rgba(15, 23, 42, 0.04);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.stat-label { font-size: 13px; color: #7b8496; }
.stat-value { font-size: 30px; line-height: 1.1; color: #0f172a; }
.stat-value em { font-size: 18px; font-style: normal; color: #b45309; }
.stat-foot { font-size: 12px; color: #94a3b8; }

/* ---------------------------------------------------------------- 图表 */

.chart {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 190px;
  padding: 8px 4px 0;
}
.chart-col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; min-width: 0; }
.bars { display: flex; align-items: flex-end; justify-content: center; gap: 3px; height: 150px; }
.bar { width: 46%; border-radius: 4px 4px 0 0; min-height: 2px; transition: height 0.3s; }
.bar.reg { background: linear-gradient(180deg, #60a5fa, #2563eb); }
.bar.login { background: linear-gradient(180deg, #c4b5fd, #7c3aed); }
.chart-label { margin-top: 8px; text-align: center; font-size: 11px; color: #94a3b8; }
.legend { font-size: 12px; color: #7b8496; display: flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.lg-reg { background: #2563eb; }
.lg-login { background: #7c3aed; }

/* ---------------------------------------------------------------- 信息表 */

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

.kv { margin: 0; display: grid; grid-template-columns: 96px 1fr; row-gap: 12px; column-gap: 12px; font-size: 13px; }
.kv dt { color: #7b8496; }
.kv dd { margin: 0; color: #0f172a; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.dim { color: #94a3b8; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; word-break: break-all; }

/* ---------------------------------------------------------------- 工具条 */

.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar .dim { font-size: 12px; }
.pager { display: flex; justify-content: flex-end; margin-top: 16px; }
.cfg-form { margin-top: 4px; max-width: 620px; }

/* ---------------------------------------------------------------- 详情弹窗 */

.dialog-tip { margin: 0 0 14px; font-size: 13px; color: #64748b; line-height: 1.6; }
.detail-wrap { display: flex; flex-direction: column; gap: 18px; }
.detail-head { display: flex; align-items: center; gap: 16px; }
.detail-head h3 { font-size: 18px; }
.detail-head p { margin: 4px 0 0; font-size: 12px; }
.detail-head .el-tag { margin-left: auto; }
.avatar {
  width: 58px; height: 58px; border-radius: 16px; overflow: hidden;
  background: linear-gradient(135deg, #3b82f6, #7c3aed);
  color: #fff; display: grid; place-items: center; font-size: 24px; font-weight: 600;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.detail-kv { background: #f8fafc; border-radius: 12px; padding: 16px; }
.detail-projects h4 { font-size: 14px; margin-bottom: 8px; }

@media (max-width: 900px) {
  .layout { flex-direction: column; }
  .sidebar { width: 100%; flex: none; height: auto; position: static; }
  .sidebar .menu { display: flex; overflow-x: auto; }
  .sidebar .menu .el-menu-item { flex: 0 0 auto; }
  .main { padding: 20px 16px 40px; }
  .two-col { grid-template-columns: 1fr; }
}
