* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #f5f7fa; font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; }

.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px;
  background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%); }
.login-card { width: 380px; max-width: 100%; }
.login-card h2 { margin: 0 0 20px; text-align: center; color: #1f2937; }
.captcha-row { display: flex; gap: 8px; align-items: center; }
.captcha-img { cursor: pointer; height: 40px; flex: none; }

.layout { display: flex; min-height: 100vh; }
.aside { width: 210px; background: #001529; flex: none; }
.aside .logo { height: 56px; line-height: 56px; color: #fff; font-size: 17px; font-weight: 600; text-align: center; }
.aside .el-menu { border-right: none; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.header { height: 56px; background: #fff; display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.header .title { font-size: 16px; font-weight: 600; }
.menu-btn { display: none; }
.content { padding: 16px; }

/* 仪表盘 */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 16px; }
.kpi { position: relative; background: #fff; border-radius: 12px; padding: 18px 20px 16px; overflow: hidden;
  box-shadow: 0 1px 2px rgba(16,24,40,.04); border: 1px solid #eef0f3; }
.kpi::before { content: ""; position: absolute; left: 0; top: 0; right: 0; height: 3px; background: var(--c); }
.kpi.blue { --c: #2a78d6; } .kpi.orange { --c: #eb6834; } .kpi.aqua { --c: #1baf7a; } .kpi.violet { --c: #6250d6; }
.kpi .label { color: #52514e; font-size: 13px; display: flex; align-items: center; gap: 6px; }
.kpi .label::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--c); }
.kpi .value { font-size: 32px; font-weight: 650; margin-top: 10px; color: #0b0b0b; line-height: 1.1;
  font-variant-numeric: tabular-nums; letter-spacing: -.5px; }
.kpi .sub { color: #8a8f98; font-size: 12px; margin-top: 8px; display: flex; align-items: center; gap: 8px; }
.delta { font-weight: 600; padding: 1px 6px; border-radius: 4px; }
.delta.up { color: #067a3a; background: #e8f6ee; }
.delta.down { color: #c0322f; background: #fdecec; }
.delta.flat { color: #6b7280; background: #f3f4f6; }

.status-bar { display: grid; grid-template-columns: repeat(4, 1fr); background: #fff; border: 1px solid #eef0f3;
  border-radius: 12px; margin-bottom: 16px; }
.status-bar .item { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px;
  text-decoration: none; color: inherit; border-left: 1px solid #f0f1f3; }
.status-bar .item:first-child { border-left: none; }
.status-bar .item:hover { background: #fafbfc; }
.status-bar .k { color: #52514e; font-size: 13px; }
.status-bar b { font-size: 18px; color: #0b0b0b; font-variant-numeric: tabular-nums; }
.status-bar .bad b { color: #c0322f; }
.status-bar .good b { color: #067a3a; }

.dash .panel { border-radius: 12px; border: 1px solid #eef0f3; padding: 18px 20px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.panel-head h3 { margin: 0; font-size: 15px; color: #0b0b0b; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid2 .panel { margin-bottom: 0; }

.rank { list-style: none; margin: 0; padding: 0; }
.rank li { display: flex; align-items: center; gap: 12px; padding: 7px 0; }
.rank .no { flex: none; width: 22px; height: 22px; border-radius: 6px; background: #f3f4f6; color: #6b7280;
  font-size: 12px; font-weight: 600; display: flex; align-items: center; justify-content: center; }
.rank .no.top { background: #e8f1fc; color: #1f5fae; }
.rank .body { flex: 1; min-width: 0; }
.rank .row { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; margin-bottom: 5px; }
.rank .name { color: #1f2937; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank .num { color: #0b0b0b; font-weight: 600; font-variant-numeric: tabular-nums; }
.rank .track { height: 6px; background: #f3f4f6; border-radius: 4px; overflow: hidden; }
.rank .fill { height: 100%; background: #2a78d6; border-radius: 4px; min-width: 4px; }
.rank-empty { color: #9ca3af; font-size: 13px; text-align: center; padding: 48px 0; }

.panel { background: #fff; border-radius: 8px; padding: 16px; margin-bottom: 16px; }
.panel h3 { margin: 0 0 12px; font-size: 15px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; align-items: center; }
.toolbar .el-input, .toolbar .el-select { width: 180px; }
.chart { height: 300px; }
.chart.tall { height: 340px; }
.pager { margin-top: 12px; display: flex; justify-content: flex-end; }
.muted { color: #9ca3af; font-size: 12px; }
.url { word-break: break-all; }
.tip { color: #6b7280; font-size: 13px; line-height: 1.7; margin: 0 0 12px; }

@media (max-width: 768px) {
  .aside { display: none; }
  .menu-btn { display: inline-flex; }
  .content { padding: 10px; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi { padding: 14px; }
  .kpi .value { font-size: 24px; }
  .status-bar { grid-template-columns: 1fr 1fr; }
  .status-bar .item:nth-child(3) { border-left: none; }
  .status-bar .item:nth-child(n+3) { border-top: 1px solid #f0f1f3; }
  .grid2 { grid-template-columns: 1fr; }
  .grid2 .panel { margin-bottom: 0; }
  .toolbar .el-input, .toolbar .el-select { width: 100%; }
  .el-dialog { width: 94% !important; }
}
@media (min-width: 769px) and (max-width: 1100px) {
  .kpis { grid-template-columns: 1fr 1fr; }
}

/* 域名商城 */
.shop-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.shop-balance { font-size: 30px; font-weight: 650; color: #0b0b0b; font-variant-numeric: tabular-nums; }
.shop-balance small { font-size: 14px; font-weight: 400; color: #52514e; }
.shop-search { display: flex; gap: 8px; }
.result-title { margin: 18px 0 10px; font-size: 14px; color: #1f2937; }
.dcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.dcard { border-radius: 10px; padding: 14px 16px; border: 1px solid; min-height: 84px; display: flex; flex-direction: column; justify-content: space-between; }
.dcard .top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dcard .name { font-weight: 600; color: #1f2937; word-break: break-all; }
.dcard .icon { flex: none; width: 22px; height: 22px; border-radius: 5px; color: #fff; font-weight: 700; font-size: 14px;
  display: flex; align-items: center; justify-content: center; }
.dcard .bottom { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; min-height: 24px; }
.dcard .st { font-size: 13px; }
.dcard .price { color: #067a3a; font-weight: 650; font-variant-numeric: tabular-nums; }
.dcard .price small { color: #52514e; font-weight: 400; font-size: 12px; }
.dcard.ok { background: #e9f7ef; border-color: #7fcf9f; }
.dcard.ok .icon { background: #1baf7a; }
.dcard.taken { background: #fdeeee; border-color: #f0a8a8; }
.dcard.taken .icon { background: none; color: #e34948; font-size: 20px; }
.dcard.taken .st { color: #c0322f; }
.dcard.premium, .dcard.error { background: #f5f6f7; border-color: #dfe1e5; }
.dcard.premium .icon, .dcard.error .icon { background: none; color: #9ca3af; font-size: 18px; }
.dcard.premium .st, .dcard.error .st { color: #6b7280; }
.money-in { color: #067a3a; font-weight: 600; }
.money-out { color: #c0322f; font-weight: 600; }
@media (max-width: 768px) {
  .dcards { grid-template-columns: 1fr 1fr; gap: 8px; }
  .dcard { padding: 10px 12px; }
  .dcard .bottom { flex-wrap: wrap; }
}
