html, body, #app { height: 100%; margin: 0; }
/* 全局防横向溢出：移动端越界的根因之一是宽内容把页面撑宽 */
html, body { max-width: 100%; overflow-x: hidden; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #f4f6f9;
}
.login-bg {
  height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg,#1f2937 0%,#374151 100%);
}
.login-card {
  width: 380px; padding: 28px 32px; background:#fff; border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,.2);
}
.login-card h2 {
  text-align: center; margin: 0 0 16px; color: #1f2937; letter-spacing: 4px;
}
.app-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; height: 56px; background: #001529; color: #fff;
}
.app-header .title { font-size: 18px; font-weight: 600; letter-spacing: 1px; }
.app-header .right { display: flex; align-items: center; gap: 10px; }
.brand { height:56px;display:flex;align-items:center;justify-content:center;color:#fff;font-weight:600;letter-spacing:2px;border-bottom:1px solid #1f2937; }
.el-aside { background: #001529 !important; }
.el-menu { border-right: none !important; }
.section-title { font-size: 16px; font-weight: 600; margin: 0 0 16px; color: #1f2937; padding-left: 8px; border-left: 4px solid #409eff; }
.page-wrap { padding: 4px; }
.page-title { margin:0 0 8px; font-size:20px; font-weight:600; color:#1f2937; }
.stat-card { text-align: center; padding: 14px 8px; border-radius: 8px; color:#fff; overflow: hidden; }
.stat-card .num { font-size: 20px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-card .lbl { font-size: 12px; opacity:.85; margin-top: 4px;}
.bg-1 { background: linear-gradient(135deg,#409eff,#0d6efd); }
.bg-2 { background: linear-gradient(135deg,#67c23a,#28a745); }
.bg-3 { background: linear-gradient(135deg,#e6a23c,#d9822b); }
.bg-4 { background: linear-gradient(135deg,#f56c6c,#dc3545); }
.bg-5 { background: linear-gradient(135deg,#909399,#5a6268); }
.bg-6 { background: linear-gradient(135deg,#9b59b6,#8e44ad); }
.muted { color:#909399; font-size: 12px; }
.toolbar { display: flex; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; align-items: center; }
.code-pre { background:#0d1117;color:#c9d1d9;padding:12px;border-radius:6px;max-height:420px;overflow:auto;font-family: monospace;font-size:12px; }

/* 角色基础属性：紧凑多列, flex 自动换行, 按字段值大小定宽 */
.attr-grid { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-bottom: 4px; }
.attr-grid .el-form-item { margin-bottom: 8px; }
.attr-grid .af-xs .el-input,
.attr-grid .af-xs .el-input-number,
.attr-grid .af-xs .el-select { width: 66px !important; }
.attr-grid .af-sm .el-input,
.attr-grid .af-sm .el-input-number { width: 90px !important; }
.attr-grid .af-md .el-input { width: 130px !important; }
.attr-grid .af-lg .el-input { width: 180px !important; }
.attr-grid .af-xl .el-input { width: 220px !important; }
.attr-grid .af-name .el-input { width: 210px !important; }
.attr-grid .el-form-item__label { padding-right: 6px !important; }

/* 服务器卡片 */
.srv-card { transition: all .2s; }
.srv-card.srv-current { border:2px solid #67c23a; }
.srv-card.srv-disabled { opacity: .55; }
.srv-card.srv-grant { border:1px dashed #e6a23c; background:#fffaf3; }
.srv-head { display:flex; justify-content:space-between; align-items:center; margin-bottom:10px; }
.srv-name { font-size:16px; font-weight:600; color:#1f2937; }
.srv-body { font-size: 13px; color: #4b5563; line-height: 1.8; }
.srv-body .muted { display:inline-block; width: 56px; }
.srv-actions { margin-top: 14px; display:flex; gap:6px; flex-wrap:wrap; }

/* 移动端响应 */
@media (max-width: 768px) {
  /* 侧边栏收窄为图标条 */
  .el-aside { width: 56px !important; }
  .brand { font-size:0; }
  .el-menu-item span, .el-menu-item-group__title { display: none; }
  .el-menu-item { padding: 0 !important; text-align: center; }

  /* 顶栏 */
  .app-header { padding: 0 10px !important; }
  .app-header .title { font-size: 14px; }
  .app-header .right { gap: 4px; }
  .app-header .right > span { display:none; }
  .app-header .el-button { padding: 6px 8px !important; }

  /* 主内容区减小内边距, 给内容更多横向空间 */
  .el-main { padding: 10px !important; }
  .page-wrap { padding: 0; }

  /* 工具栏：窄屏整齐换行，搜索框/输入占满整行 */
  .toolbar { gap: 8px; }
  .toolbar > .el-input,
  .toolbar > .el-select { width: 100% !important; }
  .toolbar > div[style*="margin-left:auto"],
  .toolbar > span[style*="margin-left:auto"] {
    margin-left: 0 !important;
    width: 100%;
    flex-wrap: wrap;
  }

  /* 表格：放进可横向滚动的容器内, 不要把整页撑宽 */
  .el-table { max-width: 100%; }
  .el-table__body, .el-table__header { font-size: 12px; }
  .el-table .el-table__cell { padding: 4px 0 !important; }

  /* 表格操作列按钮换行不挤 */
  .el-table .cell .el-button { margin: 1px 2px !important; }
  .el-table .cell .el-button + .el-button { margin-left: 2px; }

  /* 对话框：接近全屏, 限制最大宽度, 内容可纵向滚动 */
  .el-dialog {
    width: 96% !important;
    max-width: 96% !important;
    margin: 12px auto !important;
  }
  .el-dialog__body { padding: 12px 14px !important; max-height: 75vh; overflow-y: auto; }
  .el-message-box { width: 92% !important; max-width: 360px; }

  /* 表单：label 顶部对齐, 输入占满, 避免固定 label 宽度挤压 */
  .el-form-item__label { float: none !important; display: block !important; width: auto !important; text-align: left !important; padding: 0 0 2px !important; }
  .el-form-item__content { margin-left: 0 !important; }
  .el-form--label-left .el-form-item__label,
  .el-form--label-top .el-form-item__label { width: auto !important; }

  /* 栅格：移动端每列占满整行堆叠, 解决 el-col :span 固定导致的越界 */
  .el-dialog .el-col, .el-form .el-col { width: 100% !important; max-width: 100% !important; flex: 0 0 100% !important; }

  /* 内联固定宽度的输入/选择/数字框统一收成 100%, 避免横向越界 */
  .el-dialog .el-input,
  .el-dialog .el-select,
  .el-dialog .el-input-number,
  .el-dialog .el-cascader,
  .el-dialog .el-date-editor { width: 100% !important; }
  .el-input-number { max-width: 100%; }

  /* 分页器换行居中, 不溢出 */
  .el-pagination { flex-wrap: wrap; justify-content: center !important; }
  .el-pagination .el-pagination__sizes { margin: 4px 0; }

  /* 标签页标题可横向滚动 */
  .el-tabs__nav-wrap { overflow-x: auto; }

  /* 卡片/栅格间距收紧 */
  .el-row { margin-left: 0 !important; margin-right: 0 !important; }

  /* 角色属性紧凑网格: 手机上各字段收缩, 两列/一列自适应, 不溢出 */
  .attr-grid { gap: 2px 10px; }
  .attr-grid .el-form-item { flex: 1 1 44%; margin-bottom: 6px; }
  .attr-grid .af-md, .attr-grid .af-lg, .attr-grid .af-xl, .attr-grid .af-name { flex-basis: 100%; }
  .attr-grid .el-input,
  .attr-grid .el-input-number,
  .attr-grid .el-select { width: 100% !important; }
}

/* 超窄屏(<=400) 进一步压缩 */
@media (max-width: 400px) {
  .el-main { padding: 6px !important; }
  .toolbar .el-button { padding: 7px 10px !important; }
}

/* 表格紧凑：单行显示，不换行 */
.el-table .el-table__cell { padding: 6px 0 !important; }
.el-table .cell { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.4; }

/* 详情弹窗内容区域确保有高度 */
.el-dialog__body { min-height: 200px; }
.el-tabs__content { min-height: 150px; }

/* 拖拽上传区域 */
.drop-zone {
  border: 2px dashed #dcdfe6;
  border-radius: 8px;
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: all .2s;
}
.drop-zone:hover, .drop-zone.active {
  border-color: #409eff;
  background: #ecf5ff;
}

/* 加速器日志行高亮 */
.el-table .row-fail td { background: #fef0f0 !important; }
.el-table .row-warn td { background: #fdf6ec !important; }

/* ========== 介绍 / 下载 / 反馈 公开首页 ========== */
.landing {
  min-height: 100vh;
  background: linear-gradient(135deg,#0f2027 0%,#203a43 50%,#2c5364 100%);
  color: #e5edf5;
  display: flex; flex-direction: column;
}
.landing-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 40px; backdrop-filter: blur(6px);
  background: rgba(10,20,30,.35); position: sticky; top: 0; z-index: 10;
}
.landing-brand { font-size: 20px; font-weight: 700; letter-spacing: 2px; cursor: pointer; color:#fff; }
.landing-brand span { color: #4dabf7; }
.landing-nav nav { display: flex; align-items: center; gap: 24px; }
.landing-nav nav a {
  color: #cbd5e1; cursor: pointer; font-size: 15px; transition: color .2s; user-select:none;
}
.landing-nav nav a:hover, .landing-nav nav a.active { color: #4dabf7; }

.landing-hero { flex: 1; text-align: center; padding: 70px 20px 40px; }
.landing-hero h1 { font-size: 42px; margin: 0 0 16px; letter-spacing: 2px; color:#fff; }
.landing-hero .sub { font-size: 17px; color: #aab8c5; margin-bottom: 32px; }
.hero-btns { display: flex; gap: 16px; justify-content: center; margin-bottom: 56px; }
.feature-grid {
  display: grid; grid-template-columns: repeat(auto-fit,minmax(260px,1fr));
  gap: 20px; max-width: 1080px; margin: 0 auto; padding: 0 20px;
}
.feature-card {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px; padding: 24px; text-align: left; transition: transform .2s, background .2s;
}
.feature-card:hover { transform: translateY(-4px); background: rgba(255,255,255,.1); }
.feature-card .fi { font-size: 26px; color: #4dabf7; margin-bottom: 10px; }
.feature-card h3 { margin: 0 0 8px; font-size: 18px; color:#fff; }
.feature-card p { margin: 0; font-size: 13px; color: #aab8c5; line-height: 1.6; }

.landing-panel { flex: 1; max-width: 760px; width: 100%; margin: 0 auto; padding: 50px 20px; }
.landing-panel h2 { font-size: 28px; color:#fff; margin: 0 0 8px; }
.landing-panel .panel-sub { color:#aab8c5; margin-bottom: 24px; }

.dl-card {
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
  border-radius: 14px; padding: 24px;
}
.dl-icon { font-size: 42px; color: #4dabf7; }
.dl-info { flex: 1; min-width: 200px; }
.dl-title { font-size: 20px; font-weight: 600; color:#fff; }
.dl-ver { font-size: 13px; color:#4dabf7; margin-left: 10px; }
.dl-desc { font-size: 13px; color:#aab8c5; margin-top: 4px; }
.dl-note { white-space: pre-wrap; font-size: 12px; color:#cbd5e1; background: rgba(0,0,0,.25); padding: 8px 10px; border-radius: 6px; margin-top: 10px; max-height: 140px; overflow:auto; }
.dl-tips { margin-top: 30px; background: rgba(255,255,255,.05); border-radius: 12px; padding: 20px 24px; }
.dl-tips h4 { margin: 0 0 12px; color:#fff; }
.dl-tips ol { margin: 0; padding-left: 20px; color:#aab8c5; line-height: 2; font-size: 14px; }
.dl-tips a { color: #4dabf7; cursor: pointer; }

.fb-form { background: #fff; border-radius: 14px; padding: 24px 28px; color:#1f2937; }
.fb-done { background:#fff; border-radius:14px; padding: 48px 24px; text-align:center; color:#1f2937; }
.fb-done-text { font-size: 18px; color:#67c23a; margin: 12px 0 20px; }

.landing-footer { text-align: center; padding: 24px; color: #7b8a98; font-size: 13px; }

@media (max-width: 768px) {
  .landing-nav { padding: 12px 16px; }
  .landing-nav nav { gap: 14px; }
  .landing-hero h1 { font-size: 30px; }
}

/* ========== 一键搭建 ========== */
.deploy-ver-active { border: 2px solid #409eff !important; }
.deploy-log {
  background: #0d1117; color: #c9d1d9;
  font-family: Consolas, Monaco, monospace; font-size: 12px;
  line-height: 1.6; padding: 12px; border-radius: 6px;
  max-height: 560px; overflow: auto; white-space: pre-wrap; word-break: break-all;
}
.deploy-log .log-step { color: #58a6ff; }
.deploy-log .log-ok   { color: #3fb950; }
.deploy-log .log-err  { color: #f85149; }
.deploy-log .log-done { color: #d29922; font-weight: bold; }

/* ===== 服务器空状态引导 ===== */
.srv-guide { padding: 8px 4px 4px; }
.srv-guide-title { font-size: 15px; font-weight: 600; color: #303133; margin: 6px 0 16px; text-align: center; }
.srv-guide-card { cursor: pointer; height: 100%; transition: transform .15s, box-shadow .15s; text-align: center; }
.srv-guide-card:hover { transform: translateY(-3px); }
.srv-guide-card.is-disabled, .srv-guide-card:has(button[disabled]) { cursor: default; }
.srv-guide-ico { font-size: 40px; line-height: 1; margin: 8px 0 12px; }
.srv-guide-h { font-size: 16px; font-weight: 600; color: #303133; margin-bottom: 8px; }
.srv-guide-d { font-size: 13px; color: #909399; line-height: 1.7; min-height: 72px; }

/* 控制台「当前在线」实时脉冲点 */
@keyframes dashPulse {
  0%   { opacity: 1;   transform: scale(1); }
  50%  { opacity: .35; transform: scale(.7); }
  100% { opacity: 1;   transform: scale(1); }
}
