/* ============================================================
 * stage-live.css · 干活态实时面板（单 Bot 视角 · 一行行滚）
 *
 * CANDIDATE_IMPL: 'index-stage-live'
 * 这是候选实现：与 bridge.html 那套共用同一数据源、两套皮肤，待老板挑完合成一套。
 * 本文件不许被 bridge.html / bot.html 引用。
 *
 * 视觉语言对齐 bridge-hud.css：黑底、栅格、主红 #C8102E、
 * 冷青 #35e0ff、等宽字体、细描边、小字号大写英文标签。
 * ============================================================ */

.slive {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 760px;
  min-height: 0;
  height: 100%;
  border-radius: 12px;
  border: 1px solid rgba(200, 16, 46, .22);
  background:
    linear-gradient(180deg, rgba(18, 21, 27, .86), rgba(8, 10, 14, .92));
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, .03) inset,
    0 0 28px rgba(200, 16, 46, .10) inset,
    0 12px 40px rgba(0, 0, 0, .5);
  overflow: hidden;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 12.5px;
  color: #d8dbe2;
  letter-spacing: .3px;
}

/* 细栅格底纹（与 .hud-feed 同族） */
.slive::before {
  content: '';
  position: absolute; left: 0; right: 0; top: 0; bottom: 0;
  background-image:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .018) 0 1px, transparent 1px 26px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .018) 0 1px, transparent 1px 26px);
  pointer-events: none;
  z-index: 0;
}

.slive > * { position: relative; z-index: 1; }

/* ---- 顶部状态带 ---- */
.slive-top {
  flex: 0 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  background: rgba(255, 255, 255, .02);
}
.slive-top-left {
  font-size: 11px;
  letter-spacing: 2.5px;
  color: #8b909c;
  font-weight: 700;
}
.slive-top-left::before {
  content: '';
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #35e0ff;
  box-shadow: 0 0 8px #35e0ff;
  margin-right: 8px;
  vertical-align: middle;
  animation: sliveBlink 1.2s infinite;
}
.slive-top[data-global="alert"] .slive-top-left::before {
  background: #C8102E;
  box-shadow: 0 0 8px #ff5468;
}
.slive-top-state {
  font-size: 11px;
  letter-spacing: 2px;
  font-weight: 800;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .06);
  color: #8b909c;
}
.slive-top[data-global="working"] .slive-top-state {
  background: rgba(53, 224, 255, .12);
  color: #9be9ff;
}
.slive-top[data-global="focus"] .slive-top-state {
  background: rgba(53, 224, 255, .18);
  color: #d6f6ff;
  box-shadow: 0 0 10px rgba(53, 224, 255, .25);
}
.slive-top[data-global="alert"] .slive-top-state {
  background: rgba(200, 16, 46, .22);
  color: #ff9aa8;
  box-shadow: 0 0 10px rgba(200, 16, 46, .35);
}

/* ---- 主体：Bot 行列表 ---- */
.slive-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.slive-list::-webkit-scrollbar { width: 6px; }
.slive-list::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .08); border-radius: 3px; }

/* 单行：名 · 在做什么 · 第几步 · 相对时间 */
.slive-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 6px 10px 6px 12px;
  border-radius: 7px;
  background: rgba(255, 255, 255, .025);
  border-left: 2px solid #3a3f4a;   /* 行首细竖线：状态色 */
  font-size: 12.5px;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  animation: sliveRowIn .22s ease-out both;
}
@keyframes sliveRowIn {
  from { opacity: 0; transform: translateX(-4px); }
  to   { opacity: 1; transform: none; }
}

.slive-row[data-state="working"] { border-left-color: #35e0ff; }
.slive-row[data-state="working"] .slive-row-name { color: #9be9ff; }
.slive-row[data-state="working"] .slive-row-step  { color: #9be9ff; }

.slive-row[data-state="alert"] { border-left-color: #C8102E; background: rgba(200, 16, 46, .07); }
.slive-row[data-state="alert"] .slive-row-name { color: #ff9aa8; }
.slive-row[data-state="alert"] .slive-row-act  { color: #ffb3bd; font-weight: 700; }

.slive-row[data-state="idle"] .slive-row-name { color: #cfd3dc; }
.slive-row[data-state="idle"] .slive-row-act  { color: #6b7280; }

.slive-row-name {
  flex: 0 0 auto;
  font-weight: 700;
  color: #e7e9ee;
  max-width: 120px;
  overflow: hidden; text-overflow: ellipsis;
}
.slive-row-sep { color: #4a4f5a; flex: 0 0 auto; }
.slive-row-act {
  flex: 1 1 auto;
  color: #d8dbe2;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.slive-row-step {
  flex: 0 0 auto;
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .06);
  color: #cfd3dc;
  letter-spacing: 1px;
}
.slive-row-time {
  flex: 0 0 auto;
  font-size: 10.5px;
  color: #6b7280;
  font-variant-numeric: tabular-nums;
}

/* ---- 空态：AWAITING NEXT · 呼吸动画 ---- */
.slive-empty {
  flex: 1 1 auto;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
  letter-spacing: 4px;
  color: rgba(139, 144, 156, .55);
  animation: sliveBreath 2.4s ease-in-out infinite;
  padding: 24px 10px;
  text-transform: uppercase;
  font-weight: 700;
}
@keyframes sliveBreath {
  0%, 100% { opacity: .35; }
  50%      { opacity: .95; }
}
@keyframes sliveBlink {
  0%, 100% { opacity: 1; }
  50%      { opacity: .35; }
}

/* ---- 底部最近事件跑马灯 / 单行截断 ---- */
.slive-ticker {
  flex: 0 0 auto;
  display: flex; align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-top: 1px dashed rgba(255, 255, 255, .08);
  background: rgba(6, 7, 10, .55);
  font-size: 10.5px;
  color: #6b7280;
  min-height: 22px;
  overflow: hidden;
}
.slive-ticker .tk-lab {
  flex: 0 0 auto;
  letter-spacing: 2px;
  color: #35e0ff;
  font-weight: 700;
}
.slive-ticker .tk-body {
  flex: 1 1 auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #9aa0ac;
  font-variant-numeric: tabular-nums;
}
.slive-ticker .tk-who { color: #9be9ff; font-weight: 700; }
.slive-ticker.is-empty .tk-body { color: #4a4f5a; font-style: italic; }

/* ---- 375px 竖屏：单列、字号缩到 12px、不横向溢出 ---- */
@media (max-width: 375px) {
  .slive {
    max-width: 100%;
    font-size: 12px;
    border-radius: 10px;
  }
  .slive-top { padding: 6px 10px; }
  .slive-top-left { font-size: 10px; letter-spacing: 1.8px; }
  .slive-top-state { font-size: 10px; padding: 1px 8px; }
  .slive-list { padding: 6px 8px; gap: 5px; }
  .slive-row {
    font-size: 12px;
    padding: 5px 8px 5px 10px;
    gap: 5px;
    flex-wrap: nowrap;
  }
  .slive-row-name { max-width: 80px; }
  .slive-row-step { font-size: 10px; padding: 0 6px; }
  .slive-row-time { font-size: 10px; }
  .slive-ticker { font-size: 10px; padding: 4px 10px; }
  .slive-empty { font-size: 11px; letter-spacing: 3px; }
}
