/* 管理后台全局样式 */
:root { color-scheme: dark; }

* { box-sizing: border-box; }

html { background: #0a0f1e; }

body {
  margin: 0;
  background: #0a0f1e;
  color: #e2e8f0;
  font-family: "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
}

#app { min-height: 100vh; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: #1e293b; border-radius: 3px; }

/* 品牌渐变字 */
.brand-text {
  background: linear-gradient(90deg, #22d3ee, #60a5fa, #a855f7);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* 布局 */
.layout { display: flex; min-height: 100vh; }

.sidebar {
  width: 220px;
  background: #0d1428;
  border-right: 1px solid #1e293b;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 16px;
  border-bottom: 1px solid #1e293b;
}

.logo img { width: 34px; height: 34px; border-radius: 8px; }

.logo span {
  font-weight: 800;
  font-size: 15px;
}

.menu { padding: 10px 8px; }

.menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  margin-bottom: 2px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  color: #94a3b8;
  transition: all .15s;
}

.menu-item:hover { background: rgba(34,211,238,.06); color: #e2e8f0; }

.menu-item.active {
  background: rgba(34,211,238,.12);
  color: #22d3ee;
  font-weight: 700;
}

.menu-item .icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: .85;
}

.menu-item.active .icon { opacity: 1; }

.menu-item .badge {
  margin-left: auto;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: 999px;
  padding: 1px 7px;
  min-width: 18px;
  text-align: center;
}

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 60px;
  border-bottom: 1px solid #1e293b;
  background: rgba(13,20,40,.8);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.topbar .title { font-size: 15px; font-weight: 800; }

.content { padding: 24px; }

/* 统计卡片 */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.stat-card {
  background: linear-gradient(160deg, #111a33, #0d1428);
  border: 1px solid #1e293b;
  border-radius: 12px;
  padding: 16px;
}

.stat-card .label { font-size: 12px; color: #64748b; }
.stat-card .value { font-size: 22px; font-weight: 800; margin-top: 6px; }

/* 面板 */
.panel {
  background: #0d1428;
  border: 1px solid #1e293b;
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 18px;
}

.panel-title {
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

/* 图表 */
.chart { display: flex; align-items: flex-end; gap: 4px; height: 140px; }

.chart .bar {
  flex: 1;
  background: linear-gradient(180deg, #22d3ee, #3b82f6);
  border-radius: 3px 3px 0 0;
  min-height: 3px;
  opacity: .85;
}

/* 文字色 */
.text-green { color: #4ade80; }
.text-red { color: #f87171; }
.text-cyan { color: #22d3ee; }
.text-yellow { color: #facc15; }
.text-purple { color: #c084fc; }
.muted { color: #64748b; font-size: 12px; }
.mono { font-family: ui-monospace, monospace; font-size: 12px; }

/* 登录页 */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at top, #111a33, #0a0f1e);
}

.login-box {
  width: 380px;
  background: #0d1428;
  border: 1px solid #1e293b;
  border-radius: 16px;
  padding: 36px;
}

/* Element Plus 深色适配 */
.el-table {
  --el-table-bg-color: transparent;
  --el-table-tr-bg-color: transparent;
  --el-table-header-bg-color: #111a33;
  --el-table-border-color: #1e293b;
  --el-table-text-color: #cbd5e1;
  --el-table-header-text-color: #94a3b8;
  --el-table-row-hover-bg-color: rgba(34,211,238,.05);
}

.el-dialog { background: #0d1428; border: 1px solid #1e293b; }
.el-dialog__title { color: #e2e8f0; }
.el-form-item__label { color: #94a3b8 !important; }

.el-input, .el-select {
  --el-input-bg-color: #0a0f1e;
  --el-input-border-color: #334155;
  --el-input-text-color: #e2e8f0;
  --el-input-hover-border-color: #22d3ee;
}

.el-select-dropdown, .el-popper.is-light {
  background: #111a33 !important;
  border-color: #334155 !important;
}

.el-select-dropdown__item { color: #cbd5e1; }
.el-select-dropdown__item.is-hovering,
.el-select-dropdown__item:hover { background: rgba(34,211,238,.1); }

.el-pagination {
  --el-pagination-bg-color: transparent;
  --el-pagination-button-disabled-bg-color: transparent;
  --el-pagination-hover-color: #22d3ee;
}

.el-pagination button { background: transparent !important; color: #94a3b8; }
.el-pagination .el-pager li { background: transparent; color: #94a3b8; }
.el-pagination .el-pager li.is-active { color: #22d3ee; }

.el-message-box { background: #0d1428; border: 1px solid #334155; }
.el-message-box__title { color: #e2e8f0; }
.el-message-box__content { color: #94a3b8; }

.el-card { background: #0d1428; border-color: #1e293b; }
.el-tag { border: none; }

@media (max-width: 768px) {
  .sidebar { display: none; }
  .content { padding: 16px; }
}
