/**
 * 后台通用样式 — v3.0 优化版（深色模式）
 * 品工厂/安装服务/推广员 共用
 */

/* ==================== 后台头部 ==================== */
.admin-header {
  background: linear-gradient(180deg, #14121F, #0E0E14);
  color: #E6E6EF;
  padding: 18px 14px 48px;
  text-align: center;
}
.admin-header h1 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 3px;
}
.admin-header p {
  font-size: var(--fs-base, 14px);
  opacity: 0.72;
}

/* ==================== 身份选择Tabs（注册页） ==================== */
.role-select-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 12px;
}
.role-select-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 10px 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: #1A1A24;
  font-size: var(--fs-base, 14px);
  color: #9A9AB0;
  cursor: pointer;
  transition: all 0.2s;
}
.role-select-tab:hover {
  border-color: rgba(255, 255, 255, 0.18);
  color: #c7c7d6;
}
.role-select-tab.active {
  background: var(--primary-soft);
  border-color: var(--primary-light, #8B7CF6);
  color: #cbbcff;
  font-weight: 600;
  box-shadow: 0 0 0 1px var(--primary-light, #8B7CF6), 0 4px 12px rgba(139, 124, 246, 0.18);
}
.role-select-tab .role-icon {
  font-size: 16px;
}

/* ==================== 身份切换Tabs（仪表盘） ==================== */
.role-tabs {
  display: flex;
  gap: 3px;
  padding: 0 10px;
  margin: -8px 0 14px;
  position: relative;
  z-index: 5;
}
.role-tab {
  flex: 1;
  text-align: center;
  padding: 8px 3px;
  font-size: var(--fs-base, 14px);
  font-weight: 600;
  color: #9A9AB0;
  background: #16161F;
  border-radius: 8px 8px 0 0;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.3);
}
.role-tab.active {
  color: var(--primary);
  background: #16161F;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.4);
}
.role-tab:hover {
  color: var(--primary);
}

/* ==================== 后台通用行 ==================== */
.admin-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.admin-row:last-child {
  border-bottom: none;
}
.admin-row-left {
  flex: 1;
  min-width: 0;
}
.admin-row-title {
  font-size: var(--fs-base, 14px);
  font-weight: 600;
  color: #E6E6EF;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.admin-row-desc {
  font-size: var(--fs-base, 14px);
  color: #9A9AB0;
  margin-top: 2px;
}
.admin-row-actions {
  display: flex;
  gap: 5px;
  flex-shrink: 0;
  margin-left: 6px;
}

/* ==================== 小按钮 ==================== */
.btn-xs {
  padding: 3px 8px;
  font-size: var(--fs-base, 14px);
  border-radius: 5px;
}

/* ==================== 图册网格 ==================== */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.catalog-item {
  text-align: center;
}
.catalog-preview {
  width: 100%;
  aspect-ratio: 1;
  background: #1A1A24;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  overflow: hidden;
}
.catalog-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.catalog-name {
  font-size: var(--fs-base, 14px);
  color: #9A9AB0;
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==================== 安装进度 ==================== */
.progress-card {
  background: #1A1A24;
  border-radius: 8px;
  padding: 8px;
  margin-bottom: 8px;
}
.progress-order {
  font-size: var(--fs-base, 14px);
  font-weight: 600;
  color: #E6E6EF;
  margin-bottom: 8px;
}
.progress-bar-wrap {
  display: flex;
  justify-content: space-between;
  position: relative;
  padding: 0 6px;
}
.progress-bar-wrap::before {
  content: '';
  position: absolute;
  top: 7px;
  left: 16px;
  right: 16px;
  height: 2px;
  background: rgba(255,255,255,.12);
  z-index: 0;
}
.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  position: relative;
  z-index: 1;
}
.progress-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(255,255,255,.25);
  border: 2px solid #16161F;
  box-shadow: 0 0 0 2px rgba(255,255,255,.12);
}
.progress-step.done .progress-dot {
  background: #34D399;
  box-shadow: 0 0 0 2px #34D399;
}
.progress-step.active .progress-dot {
  background: var(--primary);
  box-shadow: 0 0 0 2px var(--primary);
}
.progress-step-name {
  font-size: var(--fs-base, 14px);
  color: #9A9AB0;
  text-align: center;
}
.progress-step.done .progress-step-name {
  color: #34D399;
}
.progress-step.active .progress-step-name {
  color: var(--primary);
  font-weight: 600;
}

/* ==================== 规则卡片（注册页） ==================== */
.rules-card {
  background: #16161F;
  border-radius: 10px;
  padding: 14px;
  margin: 10px;
  box-shadow: 0 2px 12px rgba(0,0,0,.4);
}
.rules-card h3 {
  font-size: var(--fs-base, 14px);
  margin-bottom: 8px;
}
.rule-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255,255,255,.08);
  font-size: var(--fs-base, 14px);
}
.rule-row:last-child {
  border-bottom: none;
}
.rule-amount {
  font-weight: 700;
  color: var(--accent);
}

/* ==================== 响应式 ==================== */
@media (max-width: 420px) {
  .role-select-tab {
    padding: 6px 3px;
    font-size: var(--fs-base, 14px);
  }
  .role-select-tab .role-icon {
    font-size: 16px;
  }
  .admin-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .admin-row-actions {
    margin-left: 0;
    width: 100%;
  }
}
