body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #020617;
  color: #e5e7eb;
  -webkit-font-smoothing: antialiased;
}

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

/* 侧边栏 */

.admin-sider {
  width: 230px;
  background:
    radial-gradient(circle at 0% 0%, rgba(129, 140, 248, 0.4), transparent 55%),
    #020617;
  border-right: 1px solid rgba(30, 64, 175, 0.9);
  padding: 14px 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.admin-logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 14px;
  background: conic-gradient(from 160deg, #f97316, #22c55e, #06b6d4, #6366f1, #f97316);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
  color: #020617;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.9);
}

.admin-logo-text {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
}

.admin-logo-text span {
  display: block;
  font-size: 10px;
  opacity: 0.75;
  font-weight: 400;
}

.admin-menu {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  margin-top: 4px;
}

.admin-menu-label {
  font-size: 10px;
  opacity: 0.6;
  padding: 4px 4px 0;
}

.admin-menu-item {
  border-radius: 10px;
  border: none;
  padding: 6px 8px;
  font-size: 11px;
  background: transparent;
  color: #9ca3af;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  text-align: left;
}

.admin-menu-item .dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.7);
}

.admin-menu-item-active,
.admin-menu-item:hover {
  background: rgba(37, 99, 235, 0.2);
  color: #e5e7eb;
}

.admin-menu-item-active .dot {
  background: conic-gradient(from 120deg, #22c55e, #06b6d4, #6366f1, #22c55e);
}

.admin-sider-footer {
  margin-top: 6px;
  font-size: 10px;
  border-top: 1px solid rgba(31, 41, 55, 0.9);
  padding-top: 6px;
}

.admin-sider-env span {
  color: #a5b4fc;
}

.admin-sider-tip {
  margin-top: 3px;
  opacity: 0.7;
}

/* 主区域 */

.admin-main {
  flex: 1;
  padding: 12px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.admin-header h1 {
  font-size: 17px;
  margin: 0 0 3px;
}

.admin-header p {
  margin: 0;
  font-size: 11px;
  opacity: 0.75;
}

.admin-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-header-user {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
}

.admin-header-user .avatar {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: radial-gradient(circle at 0% 0%, #22c55e, #22c55e, #06b6d4, #6366f1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #020617;
}

.admin-header-user .meta .name {
  font-size: 11px;
}

.admin-header-user .meta .role {
  font-size: 10px;
  opacity: 0.75;
}

.admin-header-btn {
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.9);
  background: rgba(15, 23, 42, 0.96);
  color: #e5e7eb;
  font-size: 11px;
  padding: 4px 10px;
  cursor: pointer;
}

/* 页面容器 */

.admin-page {
  display: none;
}

.admin-page-active {
  display: block;
}

/* 布局网格 */

.admin-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.admin-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

@media (max-width: 1080px) {
  .admin-grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .admin-grid-2 {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 820px) {
  .admin-app {
    flex-direction: column;
  }
  .admin-sider {
    width: auto;
    flex-direction: row;
    overflow-x: auto;
  }
  .admin-main {
    padding-top: 8px;
  }
}

/* 卡片 */

.card-metric {
  border-radius: 14px;
  padding: 8px 10px;
  background:
    radial-gradient(circle at 0% 0%, rgba(59, 130, 246, 0.4), transparent 60%),
    rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(51, 65, 85, 0.9);
}

.card-metric-label {
  font-size: 10px;
  opacity: 0.8;
}

.card-metric-value {
  font-size: 18px;
  font-weight: 700;
  margin-top: 4px;
}

.card-metric-foot {
  font-size: 10px;
  margin-top: 2px;
  opacity: 0.85;
}

.card-panel {
  border-radius: 14px;
  padding: 10px 10px 10px;
  background: radial-gradient(circle at 0% 0%, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.96));
  border: 1px solid rgba(51, 65, 85, 0.95);
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.75);
  margin-top: 10px;
}

.card-panel:first-of-type {
  margin-top: 0;
}

.card-panel-header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 6px;
}

.card-panel-title {
  font-size: 13px;
  font-weight: 600;
}

.card-panel-subtitle {
  font-size: 10px;
  opacity: 0.75;
}

.card-panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* 表格 */

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  margin-top: 4px;
}

.admin-table th,
.admin-table td {
  padding: 6px 6px;
  border-bottom: 1px solid rgba(55, 65, 81, 0.9);
}

.admin-table th {
  text-align: left;
  background: rgba(15, 23, 42, 0.98);
  font-weight: 500;
  font-size: 10px;
}

.admin-table-sm th,
.admin-table-sm td {
  padding: 4px 4px;
  font-size: 10px;
}

/* 标签 */

.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 10px;
}

.tag-green {
  background: rgba(22, 163, 74, 0.2);
  color: #4ade80;
}

.tag-yellow {
  background: rgba(202, 138, 4, 0.2);
  color: #facc15;
}

.tag-red {
  background: rgba(185, 28, 28, 0.2);
  color: #fca5a5;
}

/* 输入框 & 下拉 */

.admin-input,
.admin-select {
  border-radius: 10px;
  border: 1px solid rgba(55, 65, 81, 0.95);
  background: rgba(15, 23, 42, 0.96);
  color: #e5e7eb;
  font-size: 11px;
  padding: 5px 8px;
}

.admin-input-sm,
.admin-select-sm {
  font-size: 10px;
  padding: 3px 6px;
}

/* 按钮 */

.admin-btn {
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #22c55e, #06b6d4, #6366f1);
  color: #020617;
  font-size: 11px;
  padding: 5px 10px;
  cursor: pointer;
}

.admin-btn-sm {
  font-size: 10px;
  padding: 3px 8px;
}

.admin-link {
  border: none;
  background: transparent;
  color: #60a5fa;
  font-size: 10px;
  cursor: pointer;
  padding: 0;
}

/* 图表占位 */

.chart-placeholder {
  border-radius: 10px;
  border: 1px dashed rgba(75, 85, 99, 0.9);
  padding: 16px 10px;
  text-align: center;
  font-size: 11px;
  opacity: 0.8;
}

.chart-hint {
  font-size: 10px;
  opacity: 0.7;
  margin-top: 4px;
}

/* 设置页面布局 */

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 4px;
}

@media (max-width: 980px) {
  .settings-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.settings-title {
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 4px;
}
