/* ============================================================
   OPS Admin · 部署控制台
   风格: 清爽卡片风 — 浅色/黑夜双主题, 大圆角白卡 + 药丸按钮
   ============================================================ */

:root {
  --bg: #EEF1F6;            /* 页面底 */
  --card: #FFFFFF;          /* 卡片 */
  --soft: #F2F5F9;          /* 次级填充 */
  --text: #3D4757;
  --dim: #8A94A6;
  --line: #E4E9F2;
  --blue: #3B82F6;          /* 链接/主操作 */
  --blue-soft: #EAF2FE;
  --green: #22C55E;
  --green-soft: #E8F8EE;
  --amber: #F59E0B;
  --amber-soft: #FEF4E2;
  --red: #EF4D5E;
  --red-soft: #FDECEE;
  --accent: #2563EB;        /* 品牌深蓝 (logo 渐变底色), 统计图标默认色 */
  --shadow: 0 6px 20px rgba(37, 99, 235, 0.09);
  --shadow-lg: 0 12px 40px rgba(37, 99, 235, 0.17);
  --radius: 16px;
  /* 终端窗双主题恒定深色 */
  --term-bg: #0D1526;
  --term-text: #A3C2EC;
}

:root[data-theme="dark"] {
  --bg: #10151F;
  --card: #1A2130;
  --soft: #232C3D;
  --text: #E2E8F2;
  --dim: #7C8AA0;
  --line: #2A3446;
  --blue: #60A5FA;
  --blue-soft: rgba(96, 165, 250, 0.14);
  --green: #34D399;
  --green-soft: rgba(52, 211, 153, 0.14);
  --amber: #FBBF24;
  --amber-soft: rgba(251, 191, 36, 0.14);
  --red: #F87171;
  --red-soft: rgba(248, 113, 113, 0.14);
  --accent: #3B82F6;
  --shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.45);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

[v-cloak] { display: none; }

html {
  height: 100%;
  overflow-x: hidden;   /* 根元素禁横向滚动, 页面永不出现左右滑动条 */
}

body {
  min-height: 100%;
  width: 100%;
  overflow-x: hidden;   /* 防横向溢出导致 header 视觉不满屏 */
  background: var(--bg);
  color: var(--text);
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.6;
  transition: background 0.25s, color 0.25s;
}

.mono { font-family: "JetBrains Mono", "Cascadia Code", Consolas, monospace; }
.dim { color: var(--dim); }

/* 通用线性图标 */
.ico {
  width: 16px; height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ===== 顶栏 ===== */
.topbar {
  position: fixed;      /* fixed: 不随页面滚动 (sticky 会被 html 的 overflow-x:hidden 破坏) */
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  height: 60px;
  background: var(--card);
  box-shadow: var(--shadow);
  z-index: 10;
}

body { padding-top: 60px; }   /* 顶栏高度, 防止内容被 fixed 顶栏遮挡 */

.brand { display: flex; align-items: center; gap: 10px; }

.brand-logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  flex-shrink: 0;
}

.brand-name { font-size: 17px; font-weight: 700; letter-spacing: 0.5px; }

.topbar-right { display: flex; align-items: center; gap: 14px; position: relative; }

/* 账号区: 点击弹出退出菜单 */
.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s;
}
.user-chip:hover, .user-chip.active { background: var(--soft); }

.user-menu {
  position: absolute;
  top: 46px;
  right: 0;
  min-width: 150px;
  background: var(--card);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  padding: 6px;
  z-index: 50;
}

.user-menu button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  border: none;
  background: none;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.user-menu button:hover { background: var(--red-soft); color: var(--red); }
.user-menu .ico { width: 15px; height: 15px; }

.avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.username { font-size: 14px; font-weight: 600; }

/* 明暗切换开关 */
.theme-switch { cursor: pointer; display: inline-flex; }

.theme-switch input { display: none; }

.theme-switch .track {
  position: relative;
  width: 46px; height: 24px;
  border-radius: 999px;
  background: var(--soft);
  border: 1px solid var(--line);
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
}

.theme-switch .track .ico {
  width: 12px; height: 12px;
  color: var(--dim);
  transition: color 0.2s;
}

.icon-moon { opacity: 0; }

.theme-switch .thumb {
  position: absolute;
  top: 2px; left: 2px;
  width: 19px; height: 19px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s;
}

.theme-switch input:checked + .track { background: var(--green-soft); border-color: var(--green); }
.theme-switch input:checked + .track .thumb { transform: translateX(22px); }
.theme-switch input:checked + .track .icon-sun { opacity: 0; }
.theme-switch input:checked + .track .icon-moon { opacity: 1; }

/* ===== 主区 ===== */
.console {
  max-width: none;      /* 铺满全屏, 宽屏不再两侧留白 */
  padding: 26px 28px 80px;
}

/* 统计卡 */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 22px;
}

.stat-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px 20px 22px;
  text-align: center;
  display: grid;
  gap: 6px;
  justify-items: center;
  transition: transform 0.15s, box-shadow 0.15s;
}

.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

.stat-ico {
  width: 40px; height: 40px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.stat-card.tone-green .stat-ico { stroke: var(--green); }
.stat-card.tone-blue  .stat-ico { stroke: var(--blue); }
.stat-card.tone-amber .stat-ico { stroke: var(--amber); }
.stat-card.tone-red   .stat-ico { stroke: var(--red); }

.stat-num { font-size: 30px; font-weight: 700; line-height: 1.2; font-family: "JetBrains Mono", Consolas, monospace; }
.stat-label { font-size: 13px; color: var(--dim); }

/* 工具条: 项目列表 */
.toolbar {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 20px;
  display: flex;
  flex-wrap: wrap;      /* 窄屏时批量操作换行 */
  row-gap: 10px;
  align-items: center;
  margin-bottom: 18px;
}

/* 分组筛选标签 (工具条内靠左, 批量操作靠右) */
.filter-tabs { display: flex; flex-wrap: wrap; gap: 8px; }

/* 工具条右侧操作组 */
.toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  flex-wrap: wrap;
}

.batch-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.batch-count {
  font-size: 13px;
  font-weight: 600;
  color: var(--blue);
  background: var(--blue-soft);
  padding: 5px 14px;
  border-radius: 999px;
  white-space: nowrap;
}

/* 批量执行中的进度按钮 */
.batch-progress-btn {
  border-color: var(--amber);
  color: var(--amber);
  background: var(--amber-soft);
  margin-left: 8px;
}
.batch-progress-btn:hover { border-color: var(--red); color: var(--red); background: var(--red-soft); }

/* 未勾选时的提示 */
/* 卡片右下角勾选框: 勾选参与批量部署 */
.ship-check {
  display: flex;
  align-items: center;
  margin-left: auto;
  cursor: pointer;
  flex-shrink: 0;
}
.ship-check input {
  width: 16px;
  height: 16px;
  accent-color: var(--blue);
  cursor: pointer;
}

/* 刷新按钮 (与最初版本一致的绿色圆钮) */
.refresh-btn {
  width: 26px; height: 26px;
  border: none;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.4s;
}
.refresh-btn:hover { transform: rotate(180deg); }
.refresh-btn .ico { width: 14px; height: 14px; }

.tab {
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--dim);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.tab:hover { color: var(--blue); border-color: var(--blue); }
.tab.active { background: var(--blue); border-color: var(--blue); color: #fff; }
.tab:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

.btn-link {
  border: none;
  background: none;
  color: var(--blue);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 6px;
}
.btn-link:hover { opacity: 0.75; }

/* ===== 项目卡片 ===== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 18px;
}

.ship {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 22px;
  overflow: hidden;          /* 卡片内容再宽也不撑破布局 */
  transition: transform 0.15s, box-shadow 0.15s;
}

.ship:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

/* 勾选待批量部署的卡片高亮 */
.ship.selected { border: 1px solid var(--blue); }

.ship-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.ship-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ship-title > div { min-width: 0; flex: 1; }   /* 允许名称/地址收缩省略, 否则 nowrap 内容撑破窄屏 */

.ship-glyph {
  width: 46px; height: 46px;
  border-radius: 12px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ship-name { font-size: 16px; font-weight: 700; }
.ship-url { font-size: 11.5px; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }

/* 状态药丸 */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--dim);
  flex-shrink: 0;
}

.status-pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.status-pill[data-status="RUNNING"]   { background: var(--green-soft); color: var(--green); }
.status-pill[data-status="DEPLOYING"] { background: var(--amber-soft); color: var(--amber); }
.status-pill[data-status="DEPLOYING"] .dot { animation: pulse 1.2s ease-in-out infinite; }
.status-pill[data-status="FAILED"]    { background: var(--red-soft); color: var(--red); }

/* 运行中状态可点击 (点击 = 停止项目) */
.status-pill.clickable { cursor: pointer; }
.status-pill.clickable:hover { box-shadow: 0 0 0 3px var(--green-soft); filter: brightness(0.92); }

.ship-desc { color: var(--dim); font-size: 13px; margin: 12px 0 10px; min-height: 1.6em; }

.ship-tags { display: flex; flex-wrap: wrap; gap: 8px; }

.tag {
  font-size: 11.5px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--dim);
}

.tag-green { background: var(--green-soft); color: var(--green); }
.tag-blue { background: var(--blue-soft); color: var(--blue); }

.ship-commit {
  font-size: 12px;
  color: var(--dim);
  margin-top: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 部署中: 步骤进度 */
.ship-pipeline { display: flex; gap: 6px; margin-top: 14px; }

.pipe-node {
  flex: 1;
  text-align: center;
  font-size: 11.5px;
  padding: 4px 0;
  border-radius: 999px;
  background: var(--soft);
  color: var(--dim);
}
.pipe-node i { font-style: normal; }

.pipe-node[data-status="RUNNING"] { background: var(--amber-soft); color: var(--amber); animation: pulse 1.2s ease-in-out infinite; }
.pipe-node[data-status="SUCCESS"] { background: var(--green-soft); color: var(--green); }
.pipe-node[data-status="FAILED"]  { background: var(--red-soft); color: var(--red); }
.pipe-node[data-status="SKIPPED"] { opacity: 0.45; }

.ship-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.pipe-hint {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--amber);
  font-size: 13px;
  font-weight: 600;
}

/* ===== 按钮 (药丸) ===== */
.btn {
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 999px;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.btn:hover:not(:disabled) { border-color: var(--blue); color: var(--blue); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

.btn-primary {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}
.btn-primary:hover:not(:disabled) { background: var(--blue); color: #fff; opacity: 0.85; }

.btn-soft {
  background: var(--soft);
  border-color: transparent;
  color: var(--blue);
}
.btn-soft:hover:not(:disabled) { background: var(--blue-soft); }

.btn-danger {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}
.btn-danger:hover:not(:disabled) { background: var(--red); color: #fff; opacity: 0.85; }

/* ===== 统一对话框 ===== */
.dialog {
  width: 380px;
  max-width: 100%;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 28px 26px 24px;
  text-align: center;
}

.dialog-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dialog-icon .ico { width: 26px; height: 26px; }

.dialog-icon[data-type="confirm"] { background: var(--amber-soft); color: var(--amber); }
.dialog-icon[data-type="alert"]   { background: var(--blue-soft); color: var(--blue); }

.dialog h3 { font-size: 16px; font-weight: 700; }

.dialog p {
  color: var(--dim);
  font-size: 13.5px;
  margin: 8px 0 0;
  line-height: 1.7;
}

.dialog-foot {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 22px;
}

.dialog-foot .btn { min-width: 96px; justify-content: center; }

.spin {
  width: 13px; height: 13px;
  border: 2px solid rgba(245, 158, 11, 0.3);
  border-top-color: var(--amber);
  border-radius: 50%;
  animation: rot 0.8s linear infinite;
}

/* ===== 抽屉: 部署序列 ===== */
/* 左侧遮罩: 点击收起抽屉 */
.drawer-mask {
  position: fixed;
  inset: 0;
  background: rgba(30, 41, 59, 0.35);
  z-index: 19;   /* 抽屉(z-index:20)之下, 页面内容之上 */
}

.drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 500px;
  max-width: 100vw;
  background: var(--card);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  z-index: 20;
}

.drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
}

/* 左侧标题区: 允许收缩, 长标题/长 commit 挤压时右侧胶囊与按钮保持可见 */
.drawer-head > div:first-child { flex: 1; min-width: 0; }
.drawer-head h3 { font-size: 15px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drawer-head p { font-size: 12px; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drawer-head-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; margin-left: auto; white-space: nowrap; }

/* 部署历史列表 */
.history-list {
  list-style: none;
  padding: 16px 20px 20px;
  flex: 1;
  overflow-y: auto;
}

.history-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.15s;
}

.history-list li + li { margin-top: 8px; }
.history-list li:hover { background: var(--soft); }

.hist-body { flex: 1; min-width: 0; }
.hist-commit { font-size: 12px; color: var(--dim); }
.hist-msg { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
/* 点击展开完整提交信息 */
.hist-msg.expanded { white-space: normal; word-break: break-all; }
.hist-time { text-align: right; font-size: 11.5px; flex-shrink: 0; }
.hist-empty { justify-content: center; color: var(--dim); cursor: default; }
.hist-empty:hover { background: none; }

/* 历史条目的回滚按钮 */
.rollback-btn { padding: 5px 12px; font-size: 12.5px; flex-shrink: 0; }
.rollback-btn:hover:not(:disabled) {
  border-color: var(--amber);
  color: var(--amber);
  background: var(--amber-soft);
}

/* 部署序列 */
.sequence {
  list-style: none;
  padding: 20px 24px 24px;
  flex: 1;
  overflow-y: auto;
}

.sequence li {
  position: relative;
  display: flex;
  gap: 14px;
  padding-bottom: 22px;
  cursor: pointer;
}

.sequence li .seq-body { padding: 4px 10px; margin: -4px -10px; border-radius: 10px; transition: background 0.15s; }
.sequence li:hover .seq-body { background: var(--soft); }
.sequence li.active .seq-body { background: var(--soft); }
.sequence li.active .seq-name { color: var(--blue); }

.seq-hint { font-size: 11.5px; margin-top: 4px; opacity: 0; transition: opacity 0.15s; }
.sequence li:hover .seq-hint { opacity: 1; }

/* 展开的步骤日志面板 (恒定深色终端风) */
.step-log {
  margin-top: 10px;
  padding: 10px 14px;
  background: var(--term-bg);
  border-radius: 10px;
  max-height: 240px;
  overflow-y: auto;
  font-family: "JetBrains Mono", "Cascadia Code", Consolas, monospace;
  font-size: 12px;
  line-height: 1.7;
  color: var(--term-text);
}

.sequence li::before {
  content: "";
  position: absolute;
  left: 8px; top: 18px; bottom: 0;
  width: 2px;
  border-radius: 2px;
  background: var(--line);
}
.sequence li:last-child::before { display: none; }

.seq-node {
  width: 18px; height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
  border-radius: 50%;
  background: var(--soft);
  border: 2px solid var(--line);
  z-index: 1;
}

.sequence li[data-status="RUNNING"] .seq-node { border-color: var(--amber); background: var(--amber-soft); animation: pulse 1.2s ease-in-out infinite; }
.sequence li[data-status="SUCCESS"] .seq-node { border-color: var(--green); background: var(--green); }
.sequence li[data-status="FAILED"]  .seq-node { border-color: var(--red); background: var(--red); }

.seq-body { flex: 1; min-width: 0; }
.seq-title { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.seq-name { font-size: 14px; font-weight: 600; }
.seq-state { font-size: 12px; font-weight: 600; color: var(--dim); }
.seq-state[data-status="RUNNING"] { color: var(--amber); }
.seq-state[data-status="SUCCESS"] { color: var(--green); }
.seq-state[data-status="FAILED"]  { color: var(--red); }
.seq-state[data-status="SKIPPED"] { opacity: 0.5; }
.seq-time { font-size: 11.5px; margin-top: 2px; }

/* 终端日志窗 (双主题恒定深色) */
.terminal {
  flex: 1;
  margin: 6px 24px 24px;
  padding: 14px 16px;
  background: var(--term-bg);
  border-radius: 12px;
  overflow-y: auto;
  font-family: "JetBrains Mono", "Cascadia Code", Consolas, monospace;
  font-size: 12px;
  line-height: 1.7;
  color: var(--term-text);
}

.terminal-line { white-space: pre-wrap; word-break: break-all; }
.terminal-line.dim { color: var(--dim); }

.caret {
  display: inline-block;
  width: 7px; height: 13px;
  background: var(--term-text);
  animation: blink 1s step-end infinite;
  vertical-align: middle;
}

/* ===== 弹窗 ===== */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(30, 41, 59, 0.45);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 30;
  padding: 20px;
}

.modal {
  width: 560px;
  max-width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 24px 28px;
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.modal-head h3 { font-size: 17px; font-weight: 700; }

.form label {
  display: block;
  font-size: 12.5px;
  color: var(--dim);
  margin-bottom: 12px;
}

.form input,
.form select,
.form textarea {
  display: block;
  width: 100%;
  margin-top: 5px;
  padding: 9px 14px;
  background: var(--soft);
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--text);
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 13px;
  transition: border-color 0.15s, background 0.15s;
}

.form select { font-family: inherit; cursor: pointer; }

.form textarea {
  height: 88px;
  line-height: 1.6;
  overflow-y: auto;
  resize: vertical;   /* 可拖拽调高 */
  white-space: pre;   /* 保留命令换行/空格 */
}

.form input:focus,
.form select:focus,
.form textarea:focus { outline: none; border-color: var(--blue); background: var(--card); }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.form-tip {
  font-size: 12px;
  color: var(--dim);
  background: var(--soft);
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 12px;
}

.form-foot { display: flex; align-items: center; justify-content: flex-end; gap: 14px; margin-top: 6px; }
.err { color: var(--red); font-size: 12.5px; margin-right: auto; }

/* ===== 空态 ===== */
.empty {
  text-align: center;
  color: var(--dim);
  padding: 70px 0;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  font-size: 14px;
  display: grid;
  gap: 16px;
  justify-items: center;
}

/* ===== 登录页 ===== */
.login-body {
  min-height: 100vh;
  background: linear-gradient(135deg, #3B82F6, #1D4ED8);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* 极光渐变背景: 三团柔光高斯模糊后缓慢漂移, 垫在品牌蓝渐变底上 */
.aurora {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.aurora i {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.8;
}

.aurora i:nth-child(1) {
  width: 52vw; height: 52vw;
  left: -14vw; top: -16vw;
  background: radial-gradient(circle, #22D3EE, transparent 58%);
  animation: aurora-a 16s ease-in-out infinite alternate;
}

.aurora i:nth-child(2) {
  width: 60vw; height: 60vw;
  right: -18vw; bottom: -24vw;
  background: radial-gradient(circle, #7C8CF8, transparent 58%);
  animation: aurora-b 19s ease-in-out infinite alternate;
}

.aurora i:nth-child(3) {
  width: 36vw; height: 36vw;
  left: 36vw; bottom: -10vw;
  background: radial-gradient(circle, #38BDF8, transparent 55%);
  opacity: 0.65;
  animation: aurora-a 22s ease-in-out infinite alternate-reverse;
}

@keyframes aurora-a { to { transform: translate(6vw, 4vw) scale(1.15); } }
@keyframes aurora-b { to { transform: translate(-5vw, -6vw) scale(0.9); } }

.login-card {
  position: relative;
  width: 420px;
  max-width: 92vw;
  background: #F4F5FA;
  border-radius: 20px;
  box-shadow: 0 24px 70px rgba(23, 58, 138, 0.35);
  padding: 40px 40px 36px;
}

.login-head { text-align: center; margin-bottom: 26px; }

.login-logo {
  width: 52px;
  height: 52px;
  border-radius: 12px;
}

.login-head h1 { font-size: 19px; font-weight: 700; margin-top: 10px; color: #333A56; }
.login-head p { font-size: 13px; color: #9AA1B8; margin-top: 4px; }

.login-form { display: grid; gap: 16px; }

.input-wrap { position: relative; }

.input-ico {
  position: absolute;
  left: 15px; top: 50%;
  width: 19px; height: 19px;
  transform: translateY(-50%);
  fill: none;
  stroke: #A6ADC4;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.input-wrap input {
  width: 100%;
  height: 48px;
  padding: 0 46px 0 44px;
  background: #fff;
  border: 1px solid #E8EAF2;
  border-radius: 10px;
  color: #3D4757;
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.input-wrap input::placeholder { color: #B4BACD; }

.input-wrap input:focus {
  outline: none;
  border-color: #3B82F6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}

.pwd-toggle {
  position: absolute;
  right: 12px; top: 50%;
  transform: translateY(-50%);
  border: none;
  background: none;
  color: #A6ADC4;
  cursor: pointer;
  padding: 6px;
  display: flex;
}
.pwd-toggle:hover { color: #3B82F6; }

.remember-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: #5A617A;
  cursor: pointer;
  user-select: none;
}
.remember-row input { width: 16px; height: 16px; accent-color: #3B82F6; cursor: pointer; }

.login-err {
  color: var(--red);
  font-size: 13px;
  text-align: center;
  margin: -4px 0;
}

.login-btn {
  height: 48px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(90deg, #60A5FA, #2563EB);
  color: #fff;
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: 6px;
  cursor: pointer;
  transition: opacity 0.15s, box-shadow 0.15s;
}
.login-btn:hover:not(:disabled) { box-shadow: 0 8px 24px rgba(37, 99, 235, 0.45); }
.login-btn:disabled { opacity: 0.6; cursor: wait; }

/* ===== 动画 ===== */
@keyframes pulse { 50% { opacity: 0.35; } }
@keyframes rot   { to { transform: rotate(360deg); } }
@keyframes blink { 50% { opacity: 0; } }

.card-enter-active { transition: all 0.35s ease; }
.card-enter-from { opacity: 0; transform: translateY(10px); }
.card-leave-active { display: none; }

.drawer-enter-active, .drawer-leave-active { transition: transform 0.3s ease; }
.drawer-enter-from, .drawer-leave-to { transform: translateX(100%); }

.fade-enter-active, .fade-leave-active { transition: opacity 0.2s; }
.fade-enter-from, .fade-leave-to { opacity: 0; }

/* ===== 响应式与偏好 ===== */
@media (max-width: 900px) {
  /* minmax(0,1fr): 禁止轨道被内容最小宽度撑开 (否则 nowrap 的 git 地址会撑破窄屏) */
  .grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 760px) {
  .topbar { padding: 0 16px; }
  .console { padding: 16px 14px 60px; }
  .toolbar { padding: 12px 14px; }
  .tab { padding: 5px 13px; font-size: 12.5px; }
  .ship { padding: 16px; }
  .grid { grid-template-columns: 1fr; gap: 14px; }
  .ship-url { max-width: 100%; }
  .username { display: none; }
  .theme-switch { margin-right: 2px; }
  .drawer { width: 100vw; }
  .sequence { padding: 16px 16px 16px; }
  .step-log { max-height: 200px; }
  .ship-actions { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* 页面主滚动条隐藏 (不占布局宽度), 内部滚动区保留细滚动条 */
html {
  scrollbar-width: none;              /* Firefox */
  -ms-overflow-style: none;           /* 旧 Edge */
}
html::-webkit-scrollbar,
body::-webkit-scrollbar { width: 0; height: 0; display: none; }

/* 滚动条 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }
::-webkit-scrollbar-track { background: transparent; }
