:root {
  color: #0f172a;
  background: #f1f5f4;
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html, body, #root {
  margin: 0;
  min-height: 100%;
}

a { color: inherit; }

/* Login — match 蓝空客服 style */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: #001529;
}

.login-card {
  width: 400px;
  max-width: 100%;
  background: #fff;
  border-radius: 8px;
  padding: 40px 36px 28px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}

.login-title {
  text-align: center !important;
  margin: 0 0 28px !important;
  color: #141414 !important;
  font-weight: 700 !important;
  letter-spacing: 0.5px;
}

.login-form .ant-form-item { margin-bottom: 18px; }

.login-form .req {
  color: #ff4d4f;
  margin-right: 2px;
}

.captcha-row {
  display: flex;
  gap: 10px;
  align-items: center;
  width: 100%;
}

.captcha-canvas {
  width: 120px;
  height: 40px;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid #d9d9d9;
  flex-shrink: 0;
  background: #f0f5ff;
}

.login-btn {
  margin-top: 8px;
  height: 42px !important;
  font-size: 16px;
  border-radius: 6px !important;
  background: #1677ff !important;
  border-color: #1677ff !important;
}

.login-footer {
  margin-top: 20px;
  text-align: center;
  color: rgba(0, 0, 0, 0.45);
  font-size: 14px;
}

/* Admin shell */
.app-shell {
  min-height: 100vh;
  background: #f5f5f5;
}

.app-sider {
  background: #001529 !important;
  position: relative !important;
}

.app-sider .ant-layout-sider-children {
  display: flex;
  flex-direction: column;
}

.app-sider-brand {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.5px;
  white-space: nowrap;
  overflow: hidden;
  background: #002140;
}

.app-sider .ant-menu-dark {
  background: #001529;
  flex: 1;
  border-inline-end: none !important;
  padding-top: 8px;
}

.app-sider .ant-menu-dark .ant-menu-item {
  margin-inline: 8px;
  width: calc(100% - 16px);
  border-radius: 6px;
}

.app-sider .ant-menu-dark .ant-menu-item-selected {
  background: #1677ff !important;
}

.app-sider-collapse {
  position: absolute;
  top: 50%;
  right: -12px;
  z-index: 20;
  width: 24px;
  height: 24px;
  margin-top: -12px;
  border: none;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  color: rgba(0, 0, 0, 0.55);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 10px;
  padding: 0;
}

.app-sider-collapse:hover {
  color: #1677ff;
  box-shadow: 0 2px 10px rgba(22, 119, 255, 0.35);
}

.app-header {
  background: #fff !important;
  padding: 0 24px !important;
  height: 56px !important;
  line-height: 56px !important;
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #f0f0f0;
}

.app-header-user {
  color: rgba(0, 0, 0, 0.65);
}

.app-content {
  margin: 16px;
  padding: 20px 24px;
  background: #fff;
  border-radius: 8px;
  min-height: calc(100vh - 88px);
}

.page-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.stat-card {
  background: linear-gradient(135deg, #f0f5ff 0%, #fff 70%);
  border: 1px solid #e6f0ff;
  border-radius: 10px;
  padding: 18px 20px;
}

.stat-card .label {
  color: rgba(0, 0, 0, 0.45);
  font-size: 13px;
  margin-bottom: 8px;
}

.stat-card .value {
  font-size: 28px;
  font-weight: 700;
  color: #141414;
  line-height: 1.2;
}

@media (max-width: 900px) {
  .stat-row { grid-template-columns: 1fr; }
  .app-content { margin: 12px; padding: 16px; }
}
