/* ===== 概览页样式 ===== */
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.stat-card .ec-card__body { display: flex; align-items: center; gap: 16px; }
.stat-icon { width: 64px; height: 64px; border-radius: 12px; display: flex; align-items: center; justify-content: center; color: #fff; flex-shrink: 0; }
.stat-icon.blue { background: #409eff; }
.stat-icon.green { background: #67c23a; }
.stat-icon.orange { background: #e6a23c; }
.stat-icon.purple { background: #909399; }
.stat-info .num { font-size: calc(28px * var(--fs, 1)); font-weight: bold; color: var(--text-1); }
.stat-info .label { color: var(--text-3); font-size: calc(14px * var(--fs, 1)); margin-top: 4px; }

.quick-card { margin-top: 20px; }
.quick-card h3 { display: flex; align-items: center; gap: 6px; color: var(--text-1); margin: 0 0 16px; font-size: calc(16px * var(--fs, 1)); }
.quick-card h3 .ep-i { color: var(--accent); }
.quick-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.quick-item {
  display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 16px 10px;
  border-radius: 10px; cursor: pointer; background: var(--bg-panel-2); border: 1px solid var(--border);
  transition: all .15s;
}
.quick-item:hover { background: rgba(47,129,247,0.08); border-color: var(--accent); transform: translateY(-2px); }
.quick-item span { font-size: calc(13px * var(--fs, 1)); color: var(--text-2); }
.quick-item:hover span { color: var(--text-1); }
.quick-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; color: #fff; }
.quick-icon.green { background: #67c23a; }
.quick-icon.blue { background: #409eff; }
.quick-icon.orange { background: #e6a23c; }
.quick-icon.purple { background: #909399; }
.quick-icon.cyan { background: #00b7c3; }
.quick-icon.red { background: #f56c6c; }

.monitor-card { margin-top: 20px; }
.monitor-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.monitor-header h3 { display: flex; align-items: center; gap: 8px; font-size: calc(15px * var(--fs, 1)); color: var(--text-1); margin: 0; }
.monitor-header h3 .ep-i { color: var(--accent); }

/* 健康汇总条 */
.health-bar {
  display: flex; align-items: center; gap: 20px;
  background: var(--bg-rail); border: 1px solid var(--border-soft); border-radius: 12px;
  padding: 12px 20px; margin-bottom: 16px; position: relative;
}
.ring { flex-shrink: 0; }
.ring-label { position: absolute; left: 20px; width: 56px; text-align: center; font-size: calc(15px * var(--fs, 1)); font-weight: 700; color: var(--text-1); line-height: 56px; }
.ring-label i { font-size: calc(9px * var(--fs, 1)); font-style: normal; font-weight: 500; color: var(--text-3); }
.hb-divider { width: 1px; height: 32px; background: var(--border); flex-shrink: 0; }
.hb-stats { display: flex; gap: 24px; flex-wrap: wrap; }
.hb-stat { display: flex; align-items: baseline; gap: 6px; line-height: 1; }
.hb-stat b { font-size: calc(18px * var(--fs, 1)); font-weight: 700; color: var(--text-1); }
.hb-stat span { font-size: calc(12px * var(--fs, 1)); color: var(--text-3); }
.hb-stat.ok b { color: #3fb950; }
.hb-stat.warn b { color: #e0af68; }
.hb-stat.err b { color: #f85149; }
.hb-stat.idle b { color: #888; }
.hb-meta { margin-left: auto; display: flex; gap: 26px; flex-shrink: 0; }
.hb-meta-item { display: flex; align-items: baseline; gap: 8px; line-height: 1; }
.hb-meta-item span { font-size: calc(12px * var(--fs, 1)); color: var(--text-3); }
.hb-meta-item b { font-size: calc(15px * var(--fs, 1)); color: var(--text-1); font-weight: 700; }
.hb-meta-item b i { font-size: calc(10px * var(--fs, 1)); font-style: normal; font-weight: 400; color: var(--text-3); margin-left: 2px; }

/* 状态卡片网格 */
.url-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(270px, 100%), 350px)); justify-content: flex-start; gap: 14px; min-height: 70px; }
.url-card {
  position: relative; background: var(--bg-panel-2); border: 1px solid var(--border-soft); border-radius: 12px;
  padding: 14px 16px 13px; display: flex; flex-direction: column; gap: 10px;
  transition: transform .15s, border-color .15s, box-shadow .15s; overflow: hidden;
}
.url-card:hover { transform: translateY(-2px); border-color: var(--bg-hover); box-shadow: 0 8px 22px rgba(0,0,0,.35); }
.url-card.lvl-ok:hover { border-color: rgba(63,185,80,.4); }
.url-card.lvl-warn { border-color: rgba(224,175,104,.3); }
.url-card.lvl-err { border-color: rgba(248,81,73,.35); background: linear-gradient(180deg, rgba(248,81,73,.06), var(--bg-panel-2) 60%); }

/* 流光边框 */
@property --flow-angle { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
.url-card::after {
  content: ''; position: absolute; inset: -1px; border-radius: 13px; padding: 2px;
  pointer-events: none; opacity: 0; transition: opacity .2s;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
          mask-composite: exclude;
}
.url-card.flowing::after { opacity: 1; }
.url-card.f-green.flowing::after {
  background: conic-gradient(from var(--flow-angle), rgba(63,185,80,0) 0deg, rgba(63,185,80,0) 205deg, rgba(63,185,80,.3) 268deg, #3fb950 312deg, #c3ffd2 336deg, rgba(63,185,80,0) 360deg);
  animation: comet-run 2.4s linear 1;
}
.url-card.f-yellow.flowing::after {
  background: conic-gradient(from var(--flow-angle), rgba(224,175,104,0) 0deg, rgba(224,175,104,0) 205deg, rgba(224,175,104,.3) 268deg, #e0af68 312deg, #ffe9bd 336deg, rgba(224,175,104,0) 360deg);
  animation: comet-run 2.4s linear 1;
}
.url-card.f-red.flowing::after {
  background: conic-gradient(from var(--flow-angle), rgba(248,81,73,0) 0deg, rgba(248,81,73,0) 205deg, rgba(248,81,73,.3) 268deg, #f85149 312deg, #ffc8c4 336deg, rgba(248,81,73,0) 360deg);
  animation: comet-run 2.4s linear 1;
}
@keyframes comet-run { to { --flow-angle: 360deg; } }
.url-card.f-flash.flowing::after { animation: flash-ryb .8s linear infinite; }
@keyframes flash-ryb {
  0%, 32%   { background: conic-gradient(from var(--flow-angle), #f85149 0deg, #f85149 360deg); }
  33%, 65%  { background: conic-gradient(from var(--flow-angle), #e0af68 0deg, #e0af68 360deg); }
  66%, 100% { background: conic-gradient(from var(--flow-angle), var(--accent) 0deg, var(--accent) 360deg); }
}

.uc-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.uc-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.uc-dot.ok { background: #3fb950; box-shadow: 0 0 5px rgba(63,185,80,.5); }
.uc-dot.warn { background: #e0af68; }
.uc-dot.err { background: #f85149; }
.uc-dot.idle { background: var(--bg-hover); }
.uc-server {
  font-size: calc(13.5px * var(--fs, 1)); font-weight: 600; color: var(--text-1); cursor: pointer;
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.uc-server:hover { color: var(--accent); }
.uc-proto { font-size: calc(10px * var(--fs, 1)); font-weight: 700; padding: 2px 6px; border-radius: 4px; letter-spacing: .5px; flex-shrink: 0; }
.uc-proto.https { color: #79c0ff; background: rgba(47,129,247,.13); }
.uc-proto.http { color: #e0af68; background: rgba(224,175,104,.1); }
.uc-url { font-size: calc(13px * var(--fs, 1)); color: var(--accent); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uc-url:hover { color: #9ab6ff; text-decoration: underline; }
.uc-metrics { display: flex; align-items: center; justify-content: space-between; }
.uc-lat { font-size: calc(21px * var(--fs, 1)); font-weight: 700; color: var(--text-1); line-height: 1; }
.uc-lat i { font-size: calc(11px * var(--fs, 1)); font-style: normal; font-weight: 500; color: var(--text-3); margin-left: 2px; }
.uc-lat.slow { color: #e0af68; }
.uc-lat.dim { color: var(--text-3); font-weight: 400; font-size: calc(15px * var(--fs, 1)); }
.uc-code { font-size: calc(12px * var(--fs, 1)); font-weight: 700; padding: 3px 10px; border-radius: 20px; line-height: 1.4; }
.uc-code.good { color: #3fb950; background: rgba(63,185,80,.12); }
.uc-code.bad { color: #f85149; background: rgba(248,81,73,.12); }
.uc-cert { display: flex; flex-direction: column; gap: 6px; }
.uc-cert-text { font-size: calc(11px * var(--fs, 1)); color: var(--text-2); line-height: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uc-cert-text.expiring { color: #e0af68; }
.uc-cert-text.expired, .uc-cert-text.invalid { color: #f85149; }
.uc-cert-text.dim { color: var(--text-3); }
.uc-error {
  display: flex; align-items: center; gap: 6px; font-size: calc(11px * var(--fs, 1)); color: #f85149;
  background: rgba(248,81,73,.08); border-radius: 6px; padding: 6px 9px;
}
.uc-error span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uc-error .ep-i { flex-shrink: 0; }

@media (max-width: 1090px) { .quick-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 820px)  { .quick-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 620px)  { .health-bar { flex-wrap: wrap; gap: 16px; } .hb-meta { margin-left: 0; width: 100%; justify-content: space-between; } .url-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px)  { .quick-grid { grid-template-columns: repeat(2, 1fr); } .stat-row { grid-template-columns: repeat(2, 1fr); } }
