/* Console 骨架与页面样式（控制台四页共用）。
   布局：头 64 + 侧栏 250 + 内容区。视觉规格来自 .pen Console 画板组。 */
body { background: #fff; }

.c-header-right { display: flex; align-items: center; gap: 16px; }
.c-user-wrap { position: relative; }
.c-user {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 8px;
  color: #203454;
  font-size: 14px;
  font-weight: 500;
  transition: background var(--dur);
}
.c-user:hover { background: var(--surface-secondary); }
.c-user-menu { right: 0; top: calc(100% + 6px); }
.c-user-name { font-weight: 600; color: var(--text-primary); }

.c-body { display: flex; align-items: stretch; flex: 1; width: 100%; }
.c-side {
  width: 250px;
  flex: none;
  background: #F8FAFD;
  border-right: 1px solid #E5EAF2;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
}
.c-nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  color: #203454;
  transition: background var(--dur), color var(--dur);
}
.c-nav-item:hover { background: #EDF2F9; }
.c-nav-item.is-active { background: var(--c-nav-active); color: var(--p-link); font-weight: 600; }

.c-main {
  flex: 1;
  min-width: 0;
  padding: 24px 32px 64px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ── 页头 ── */
.c-head h1 { font-family: var(--font-display); font-size: 20px; font-weight: 700; color: var(--c-ink); }
.c-head .sub { margin-top: 6px; font-size: 14px; color: var(--c-muted); }

/* ── 面板 ── */
.c-panel {
  background: #fff;
  border: 1px solid #D9E1EC;
  border-radius: 8px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.c-panel-t { font-size: 14px; font-weight: 600; color: var(--c-ink); }
.c-panel-head { display: flex; align-items: center; justify-content: space-between; min-height: 28px; }

/* ── 额度卡 ── */
.quota-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.quota-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  background: var(--c-bg);
  border: 1px solid var(--c-line);
  border-radius: 8px;
}
.quota-card .q-head { display: flex; align-items: center; justify-content: space-between; font-size: 14px; color: #65748A; }
.quota-card .q-val { font-family: var(--font-data); font-size: 14px; font-weight: 600; color: var(--p-link); }
.quota-card .q-big { font-family: var(--font-data); font-size: 22px; font-weight: 700; color: var(--c-ink); }
.quota-track { height: 8px; border-radius: 4px; background: var(--accent-soft); overflow: hidden; }
.quota-fill { height: 100%; border-radius: 4px; background: var(--p-link); transition: width 300ms ease; }
.quota-fill.is-full { background: var(--warning); }
.quota-note { font-size: 12px; color: #9AA7BA; line-height: 1.6; }
.reset-badge {
  padding: 5px 10px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--p-link);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

/* ── 密钥卡 ── */
.key-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 40px;
  padding: 4px 12px;
  background: #F7F9FC;
  border: 1px solid #E2E8F0;
  border-radius: 5px;
}
.key-val { font-family: var(--font-data); font-size: 14px; color: #24354D; letter-spacing: 0.02em; word-break: break-all; }
.key-val.is-plain { color: var(--danger); font-weight: 600; }
.key-meta { display: flex; gap: 32px; font-size: 13px; color: #64748B; flex-wrap: wrap; }
.key-meta .mono { color: #334155; }
.key-actions { display: flex; gap: 10px; }

/* ── 账户设置 ── */
.set-profile { display: flex; align-items: baseline; gap: 14px; margin: 4px 0 10px; }
.set-name { font-family: var(--font-display); font-size: 20px; font-weight: 600; color: var(--p-ink); }
.set-id { font-size: 13px; color: #64748B; }
.set-link-name { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: #24354D; }
.set-link-name .ic { display: inline-flex; color: var(--p-link); }
.set-divider { height: 1px; margin: 14px 0 4px; background: #EDF1F7; }

.key-warn {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 8px;
  background: #FFFBEB;
  border: 1px solid #FDE8C4;
  font-size: 13px;
  color: #92700C;
  line-height: 1.6;
}
.key-warn .ic { color: var(--warning); flex: none; margin-top: 2px; }

/* ── 步骤 ── */
.g-steps { display: flex; flex-direction: column; gap: 14px; }
.g-step { display: flex; gap: 12px; align-items: center; }
.g-step-num {
  width: 28px; height: 28px; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-soft);
  border-radius: 6px;
  color: var(--p-link);
  font-family: var(--font-data);
  font-size: 14px;
  font-weight: 600;
}
.g-step-t { font-size: 14px; font-weight: 600; color: #334155; }
.g-step-d { font-size: 12px; color: #7B8798; margin-top: 2px; }

/* ── 记录表 ── */
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th {
  height: 42px;
  padding: 0 14px;
  background: #F8FAFC;
  color: var(--c-muted);
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
}
.tbl td { padding: 14px; border-top: 1px solid #EEF1F5; color: var(--c-ink); vertical-align: middle; }
.tbl td.mono { font-family: var(--font-data); font-size: 13px; }
.tbl .lnk { color: var(--c-blue); font-weight: 600; cursor: pointer; }
.tbl .lnk:hover { text-decoration: underline; }
.st-ok, .tbl td.st-ok { color: var(--c-green); }
.st-warn, .tbl td.st-warn { color: var(--c-orange); }
.st-err, .tbl td.st-err { color: var(--c-red); }
.st-mut, .tbl td.st-mut { color: #64748B; }
.st-info, .tbl td.st-info { color: var(--p-link); }

.tbl-foot { display: flex; align-items: center; justify-content: space-between; padding: 4px 2px 0; }
.tbl-foot .cnt { font-size: 12px; color: var(--c-muted); }

/* ── 欢迎块与快捷入口 ── */
.welcome h1 { font-family: var(--font-display); font-size: 20px; font-weight: 700; color: var(--c-ink); }
.welcome p { margin-top: 6px; font-size: 14px; color: var(--c-muted); }
.entry-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.entry-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  background: #fff;
  border: 1px solid #D9E1EC;
  border-radius: 8px;
  transition: border-color var(--dur), box-shadow var(--dur), transform var(--dur);
}
.entry-card:hover { border-color: #C6D6EE; box-shadow: var(--shadow-card); transform: translateY(-1px); }
.entry-card .e-ic {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--p-link);
}
.entry-card h3 { font-size: 15px; font-weight: 600; color: var(--c-ink); }
.entry-card p { font-size: 12px; color: var(--c-muted); line-height: 1.6; }
.entry-card .go { margin-top: auto; font-size: 13px; font-weight: 600; color: var(--p-link); }

/* ── 骨架行 ── */
.skel-row { height: 46px; border-radius: 6px; }

@media (max-width: 1320px) {
  .c-main { padding: 24px 20px 56px; }
  .c-side { width: 220px; }
}

/* ── 双栏分块（密钥页 开始使用/示例） ── */
.split-grid { display: grid; grid-template-columns: 340px 1fr; gap: 24px; align-items: start; }
@media (max-width: 1320px) { .split-grid { grid-template-columns: 300px 1fr; } }

/* ── 首页指标卡与趋势图 ── */
.metric-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.metric {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: 8px;
}
.metric-label { font-size: 14px; color: var(--c-muted); }
.metric-val { font-family: var(--font-data); font-size: 28px; font-weight: 700; color: var(--c-ink); }
.metric-foot { font-size: 12px; color: var(--c-muted); }
.chart {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 240px;
  padding: 0 6px;
}
.chart-col {
  flex: 1;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.chart-bar { width: 100%; border-radius: 3px 3px 0 0; background: #B9D0FF; min-height: 2px; transition: filter var(--dur); }
.chart-col:hover .chart-bar { filter: brightness(0.92); }
.chart-bar.is-hi { background: var(--c-blue); }
.legend-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--c-blue);
  margin-right: 6px;
}
