html,
body,
#app {
  margin: 0;
  height: 100%;
  overflow: hidden;
  font-family: 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
  background: #f5f7fa;
}

.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1a1520 0%, #2d2438 50%, #1e2a3a 100%);
}

.login-card {
  width: 380px;
  padding: 36px 32px 28px;
  border-radius: 12px;
}

.login-card h2 {
  margin: 0 0 4px;
  text-align: center;
  font-size: 24px;
  letter-spacing: 0.12em;
}

.login-card .sub {
  text-align: center;
  color: #909399;
  margin-bottom: 28px;
  font-size: 13px;
}

.layout {
  height: 100vh;
  overflow: hidden;
}

.layout .aside {
  background: #1f2430;
  border-right: none;
  overflow: auto;
}

.brand {
  height: 56px;
  display: flex;
  align-items: center;
  padding: 0 20px;
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.16em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.brand span {
  font-size: 12px;
  font-weight: 400;
  opacity: 0.55;
  margin-left: 8px;
  letter-spacing: 0;
}

.layout .el-menu {
  border-right: none;
  background: transparent;
}

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

.header h1 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #303133;
}

.main {
  padding: 16px 20px 28px;
  overflow: auto;
  background: #f5f7fa;
  height: calc(100vh - 56px);
  box-sizing: border-box;
}

.main.is-dash {
  padding: 12px 16px;
  overflow: hidden;
}

.panel {
  background: #fff;
  border-radius: 8px;
  padding: 16px;
}

/* —— 仪表盘一屏布局 —— */
.dash {
  height: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 10px;
  overflow: hidden;
  min-height: 0;
}

.dash-top {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
}

.dash-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  border-radius: 10px;
  color: #fff;
  background:
    radial-gradient(420px 120px at 90% 0%, rgba(230, 106, 204, 0.35), transparent),
    linear-gradient(120deg, #2a2035 0%, #3a2a4a 45%, #1f3a45 100%);
}

.dash-hello {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.dash-sub {
  margin-top: 2px;
  font-size: 12px;
  opacity: 0.75;
}

.dash-hero-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

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

.kpi-card {
  background: #fff;
  border-radius: 10px;
  padding: 10px 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.kpi-card .label {
  color: #909399;
  font-size: 12px;
}

.kpi-card .value {
  margin-top: 4px;
  font-size: 22px;
  font-weight: 700;
  color: #303133;
  line-height: 1.15;
}

.kpi-card.kpi-pink .value { color: #e66acc; }
.kpi-card.kpi-teal .value { color: #13c2c2; }
.kpi-card.kpi-warn .value { color: #e6a23c; }
.kpi-card.kpi-warn { cursor: pointer; }

.kpi-foot {
  margin-top: 4px;
  font-size: 11px;
  color: #909399;
}

.kpi-foot .up { color: #67c23a; margin-left: 2px; }
.kpi-foot .down { color: #f56c6c; margin-left: 2px; }

.mini-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  padding: 6px 12px;
  background: #fff;
  border-radius: 8px;
  font-size: 12px;
  color: #606266;
}

.mini-strip b {
  color: #303133;
  font-size: 13px;
  margin-left: 2px;
}

.mini-strip .alert b { color: #f56c6c; }

.mini-strip .quick-inline {
  margin-left: auto;
  display: flex;
  gap: 2px;
}

.dash-mid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 0.9fr;
  gap: 10px;
  min-height: 0;
  overflow: hidden;
}

.dash-bot {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 10px;
  min-height: 0;
  overflow: hidden;
}

.panel-card {
  border: none !important;
  border-radius: 10px !important;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.panel-card .el-card__header {
  padding: 8px 12px;
  flex-shrink: 0;
}

.panel-card .el-card__body {
  padding: 8px 12px 10px;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.panel-card.fill .el-card__body {
  padding-top: 0;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  font-size: 13px;
}

.trend {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  flex: 1;
  min-height: 0;
  padding-top: 4px;
}

.trend-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.trend-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 76px;
}

.trend-bars .bar {
  width: 10px;
  border-radius: 5px 5px 2px 2px;
  min-height: 4px;
}

.trend-bars .bar.amount {
  background: linear-gradient(180deg, #e66acc, #c45ab0);
}

.trend-bars .bar.count {
  background: linear-gradient(180deg, #5cd6d0, #13c2c2);
}

.trend-meta {
  text-align: center;
  line-height: 1.25;
}

.trend-amt {
  font-size: 10px;
  color: #606266;
  font-weight: 600;
}

.trend-date {
  font-size: 11px;
  color: #909399;
}

.type-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.type-list.compact {
  gap: 6px;
}

.type-top {
  display: flex;
  justify-content: space-between;
  margin-bottom: 2px;
  font-size: 12px;
  gap: 8px;
}

.type-top span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.empty-block {
  padding: 12px 0;
  text-align: center;
  color: #c0c4cc;
  font-size: 12px;
}

.todo-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.todo-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #f8f9fb;
  cursor: pointer;
}

.todo-item:hover {
  background: #f0f2f5;
}

.todo-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #ecf5ff;
  color: #409eff;
  flex-shrink: 0;
}

.todo-icon.warn {
  background: #fdf6ec;
  color: #e6a23c;
}

.todo-icon.danger {
  background: #fef0f0;
  color: #f56c6c;
}

.todo-title {
  font-size: 13px;
  font-weight: 600;
  color: #303133;
}

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

.pager {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
  padding-top: 4px;
}

.thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 6px;
  background: #f2f3f5;
}

.muted {
  color: #909399;
  font-size: 12px;
}

.order-detail-line {
  margin: 4px 0;
  color: #606266;
  font-size: 13px;
}

@media (max-width: 1200px) {
  .dash-mid {
    grid-template-columns: 1fr 1fr;
  }
  .dash-mid .panel-card:last-child {
    grid-column: 1 / -1;
  }
  .dash-bot {
    grid-template-columns: 1fr;
  }
}
