:root {
  --el-color-primary: #1f8a70;
  --el-color-primary-light-3: #4aa88f;
  --el-color-primary-light-5: #79c0ac;
  --el-color-primary-light-7: #a7d8c9;
  --el-color-primary-light-8: #bde3d7;
  --el-color-primary-light-9: #d9efe7;
  --el-color-primary-dark-2: #196e59;
  --sidebar-bg: #1b2b28;
  --sidebar-active: #1f8a70;
  --page-bg: #f4f6f5;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--page-bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

#app { height: 100%; }

.boot-loading {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #5d7a72;
  gap: 16px;
}

.boot-spinner {
  width: 28px;
  height: 28px;
  border: 2px solid #cfe3dc;
  border-top-color: var(--el-color-primary);
  border-radius: 50%;
  animation: boot-spin 0.8s linear infinite;
}

@keyframes boot-spin { to { transform: rotate(360deg); } }

/* ===== 布局 ===== */
.admin-shell { display: flex; height: 100%; }

.sidebar {
  width: 208px;
  flex: 0 0 208px;
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
}

.sidebar-brand {
  padding: 20px 20px 18px;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-brand .title { font-size: 17px; font-weight: 600; letter-spacing: 1px; }
.sidebar-brand .sub { font-size: 12px; color: #8faaa3; margin-top: 4px; }

.sidebar-menu { flex: 1; padding: 12px 0; overflow-y: auto; }

.menu-item {
  padding: 11px 20px;
  color: #bfd0cb;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-left: 3px solid transparent;
  transition: background 0.15s;
}

.menu-item:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }

.menu-item.active {
  background: rgba(31, 138, 112, 0.18);
  color: #fff;
  border-left-color: var(--sidebar-active);
}

.menu-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #6d8b83;
  flex: 0 0 6px;
}

.menu-item.active .menu-dot { background: var(--sidebar-active); }

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

.topbar {
  height: 56px;
  background: #fff;
  border-bottom: 1px solid #e6ebe9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  flex: 0 0 56px;
}

.topbar-title { font-size: 16px; font-weight: 600; color: #1f2d2a; }
.topbar-right { display: flex; align-items: center; gap: 14px; font-size: 13px; color: #5d7a72; }

.content { flex: 1; overflow-y: auto; padding: 20px 24px 32px; }

/* ===== 卡片与表格 ===== */
.panel {
  background: #fff;
  border-radius: 10px;
  padding: 18px 20px;
  margin-bottom: 16px;
  box-shadow: 0 1px 2px rgba(16, 40, 34, 0.05);
}

.panel-title {
  font-size: 15px;
  font-weight: 600;
  color: #1f2d2a;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
}

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

.stat-card {
  background: #fff;
  border-radius: 10px;
  padding: 16px 18px;
  box-shadow: 0 1px 2px rgba(16, 40, 34, 0.05);
}

.stat-label { font-size: 13px; color: #7a918b; }
.stat-value { font-size: 26px; font-weight: 600; color: #1f2d2a; margin-top: 6px; }
.stat-sub { font-size: 12px; color: #9aafaa; margin-top: 4px; }

/* ===== 登录页 ===== */
.login-page {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #e9f2ef 0%, #f4f6f5 100%);
}

.login-card {
  width: 380px;
  background: #fff;
  border-radius: 14px;
  padding: 36px 34px 30px;
  box-shadow: 0 6px 24px rgba(16, 40, 34, 0.08);
}

.login-title { font-size: 20px; font-weight: 600; color: #1f2d2a; text-align: center; }
.login-sub { font-size: 13px; color: #8ba39c; text-align: center; margin: 8px 0 24px; }

.login-tip {
  margin-top: 18px;
  font-size: 12px;
  color: #9aafaa;
  text-align: center;
  line-height: 1.7;
}

/* ===== 宠物形象卡片 ===== */
.species-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.species-card {
  border: 1px solid #e6ebe9;
  border-radius: 10px;
  padding: 16px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.species-card:hover { border-color: var(--el-color-primary-light-5); box-shadow: 0 2px 8px rgba(31, 138, 112, 0.1); }
.species-card.selected { border-color: var(--el-color-primary); box-shadow: 0 0 0 2px var(--el-color-primary-light-9); }

.species-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.species-name { font-size: 15px; font-weight: 600; color: #1f2d2a; }
.species-desc { font-size: 12px; color: #8ba39c; line-height: 1.6; min-height: 38px; }
.species-foot { display: flex; gap: 14px; margin-top: 10px; font-size: 12px; color: #7a918b; }

.empty-tip { text-align: center; color: #9aafaa; padding: 40px 0; font-size: 14px; }

.level-bar {
  height: 6px;
  background: #eaf1ee;
  border-radius: 3px;
  overflow: hidden;
  margin-top: 8px;
}

.level-bar-inner { height: 100%; background: var(--el-color-primary); border-radius: 3px; }
