/* ==========================================================================
   控制台（首页）
   --------------------------------------------------------------------------
   结构：
     页头 → 概览格子 → 快捷操作 → 最近活动

   设计要点：
     · 概览格子用「左侧强调色竖条」代替图标 —— 省空间，且能一眼扫出
       哪些状态需要注意（绿=正常 / 黄=注意 / 红=异常 / 青=信息）
     · 活动流用「小圆点 + 右侧标签」双重编码，扫起来快
     · gas 价格放进概览，因为它是实时变化的，让页面显得"活着"
   ========================================================================== */

/* ---------- 页头 ---------- */

.dash-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.dash-head h1 {
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

/* 欢迎语里的域名用渐变色，和品牌一致 */
.dash-head h1 .grad {
  background: linear-gradient(135deg, #fff, var(--neon-light));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.dash-head p {
  color: var(--text-dim);
  font-size: 14px;
  margin-top: 6px;
}

/* ---------- 概览格子 ---------- */

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

.stat {
  position: relative;
  padding: 16px 17px 17px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 13px;
  overflow: hidden;
  transition: border-color .2s, transform .2s;
}
.stat:hover {
  border-color: var(--border-bright);
  transform: translateY(-2px);
}

/* 左侧强调竖条：颜色由 --accent 决定 */
.stat::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--accent, var(--neon)), transparent);
}

.stat-label {
  font-size: 11.5px;
  color: var(--text-mute);
  letter-spacing: .04em;
  margin-bottom: 7px;
}

.stat-value {
  font-size: 26px;
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
/* 文字型数值（域名、地址）用小字号 */
.stat-value.sm {
  font-size: 15px;
  font-weight: 600;
  word-break: break-all;
  line-height: 1.3;
}
.stat-value.mono {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
}

.stat-note {
  font-size: 11px;
  color: var(--text-mute);
  margin-top: 6px;
}

/* 状态色 */
.stat.ok::before   { --accent: var(--ok, #22c55e); }
.stat.warn::before { --accent: #eab308; }
.stat.err::before  { --accent: var(--err, #ef4444); }
.stat.info::before { --accent: var(--neon-2); }

/* 齿轮状态的"在线"脉冲点 */
.pulse {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--ok, #22c55e);
  margin-right: 6px;
  vertical-align: middle;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, .6);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(34, 197, 94, .55); }
  70%  { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

/* ---------- 快捷操作 ---------- */

.quick {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 11px;
  margin-bottom: 28px;
}

.quick a {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 15px 17px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 13px;
  text-decoration: none;
  color: inherit;
  transition: border-color .2s, transform .2s, background .2s;
}
.quick a:hover {
  border-color: rgba(124, 58, 237, .4);
  background: rgba(124, 58, 237, .06);
  transform: translateY(-2px);
}

.quick .q-ico {
  width: 34px; height: 34px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(124, 58, 237, .12);
  color: var(--neon-light);
}
.quick .q-ico svg { width: 17px; height: 17px; display: block; }

.quick .q-txt {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.4;
}

.quick .q-title {
  font-size: 14px;
  font-weight: 600;
}

/* ⚠️ 标题和说明都是 <span>（行内元素），不加 display:block 的话
     会挤在同一行 —— 比如「注册新域名一次得到两个域名」。 */
.quick .q-desc {
  display: block;
  font-size: 12px;
  color: var(--text-mute);
  margin-top: 3px;
}

.quick .q-arrow {
  margin-left: auto;
  color: var(--text-mute);
  flex-shrink: 0;
  transition: transform .2s, color .2s;
}
.quick a:hover .q-arrow {
  transform: translateX(3px);
  color: var(--neon-light);
}

/* ---------- 区块标题 ---------- */

.sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 13px;
}
.sec-head h2 {
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.01em;
}
.sec-head a {
  font-size: 12.5px;
  color: var(--text-mute);
  text-decoration: none;
  transition: color .16s;
}
.sec-head a:hover { color: var(--neon-light); }

/* ---------- 活动流 ---------- */

.activity {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 13px;
  overflow: hidden;
}

.act-row {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 13px 17px;
  border-bottom: 1px solid rgba(255, 255, 255, .04);
  transition: background .16s;
}
.act-row:last-child { border-bottom: none; }
.act-row:hover { background: rgba(255, 255, 255, .02); }

/* 类型圆点：和右侧标签双重编码 */
.act-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--neon);
}
.act-dot.dns  { background: var(--neon-2); }
.act-dot.mint { background: var(--ok, #22c55e); }

.act-body { flex: 1; min-width: 0; }

.act-name {
  font-family: var(--mono);
  font-size: 13.5px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.act-name em {
  font-style: normal;
  color: var(--text-mute);
}

.act-meta {
  font-size: 11.5px;
  color: var(--text-mute);
  margin-top: 2px;
}

.act-tag {
  flex-shrink: 0;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .04em;
  background: rgba(124, 58, 237, .14);
  color: var(--neon-light);
}
.act-tag.dns  { background: rgba(6, 182, 212, .13); color: var(--neon-2-light); }
.act-tag.mint { background: rgba(34, 197, 94, .13); color: #4ade80; }

.act-time {
  flex-shrink: 0;
  font-size: 11.5px;
  color: var(--text-mute);
  font-variant-numeric: tabular-nums;
}

/* ---------- 「接下来」引导 ----------
 *
 * 控制台不放域名列表（那是「我的域名」页的职责），
 * 改放三步引导 —— 对新用户来说，「接下来做什么」比「我有什么」更有用。
 */

.dash-tips {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.tip {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 15px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: border-color .2s, background .2s;
}
.tip:hover {
  border-color: var(--border-bright);
  background: rgba(255, 255, 255, .022);
}

.tip-n {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: rgba(124, 58, 237, .14);
  color: var(--neon-light);
  font-size: 12px;
  font-weight: 700;
  margin-top: 1px;
}

.tip strong {
  display: block;
  font-size: 14px;
  font-weight: 620;
  margin-bottom: 3px;
}

.tip p {
  font-size: 12.8px;
  color: var(--text-dim);
  line-height: 1.65;
}

.tip code {
  font-family: var(--mono);
  font-size: .92em;
  color: var(--neon-light);
  background: rgba(124, 58, 237, .1);
  padding: 1px 5px;
  border-radius: 4px;
  white-space: nowrap;
}

/* ---------- 未连接 / 空状态 ---------- */

.connect-prompt {
  text-align: center;
  padding: 44px 24px;
  background: var(--bg-card);
  border: 1px dashed var(--border-bright);
  border-radius: 14px;
}

.connect-prompt .ico {
  width: 46px; height: 46px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(124, 58, 237, .1);
  color: var(--neon-light);
}
.connect-prompt .ico svg { width: 22px; height: 22px; display: block; }

.connect-prompt h3 {
  font-size: 16px;
  font-weight: 650;
  margin-bottom: 6px;
}
.connect-prompt p {
  font-size: 13.5px;
  color: var(--text-dim);
  margin-bottom: 20px;
  line-height: 1.7;
}

/* ---------- 窄屏 ---------- */

@media (max-width: 620px) {
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-value { font-size: 22px; }
  .act-tag, .act-time { display: none; }
  .act-name { white-space: normal; }
  .quick { grid-template-columns: 1fr; }
}

/* ---------- 无障碍 ---------- */

@media (prefers-reduced-motion: reduce) {
  .pulse { animation: none; }
  .stat:hover,
  .quick a:hover { transform: none; }
}
