* { box-sizing: border-box; }
html, body, #app { margin: 0; height: 100%; font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; }
.login-page { min-height: 100%; display: flex; align-items: center; justify-content: center; background: linear-gradient(160deg, #16324f, #3d6b8a); }
.login-card { width: 380px; background: #fff; border-radius: 12px; padding: 36px 32px 28px; }
.brand { font-size: 26px; font-weight: 700; color: #16324f; }
.sub { color: #7b8794; margin: 8px 0 22px; }
.full { width: 100%; }
.shell { display: flex; min-height: 100%; background: #f4f6f8; }
.sider { width: 230px; background: #1f2a37; color: #fff; overflow: auto; }
.logo { height: 56px; display: flex; align-items: center; padding: 0 18px; font-weight: 700; letter-spacing: 1px; }
.mark { display: inline-block; width: 18px; margin-right: 6px; color: #8fb7d6; }
.sider .el-menu { border-right: 0; }
.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar { height: 56px; background: #fff; display: flex; align-items: center; justify-content: space-between; padding: 0 20px; border-bottom: 1px solid #e6ebf0; font-weight: 600; }
.user { display: flex; align-items: center; gap: 8px; font-weight: 400; }
.content { padding: 16px; }
.cards { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.card { background: #fff; border-radius: 8px; padding: 16px; }
.card-label { color: #7b8794; font-size: 13px; }
.card-value { margin-top: 8px; font-size: 24px; font-weight: 700; color: #16324f; }
.panel { margin-top: 12px; background: #fff; border-radius: 8px; padding: 16px; }
.cards .panel { grid-column: 1 / -1; }
.toolbar { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; align-items: center; }
.q { width: 180px; }
.pager { display: flex; justify-content: flex-end; margin-top: 12px; }
.hint { color: #7b8794; font-size: 13px; line-height: 32px; }
.build-section { font-weight: 700; margin: 12px 0; color: #16324f; }
.build-form { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.build-form .el-form-item { margin-bottom: 12px; }
.ad-json textarea { font-family: Consolas, "Courier New", monospace; }
.upload-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 12px; }
.upload-box { background: #f7f9fb; border: 1px dashed #c9d3df; border-radius: 8px; padding: 12px; min-height: 150px; }
.upload-box-drag { border-color: #409eff; background: #ecf5ff; }
.upload-label { font-weight: 600; margin-bottom: 8px; color: #16324f; }
.upload-file { margin-top: 8px; color: #7b8794; font-size: 12px; word-break: break-all; }
.preview { display: block; margin-top: 8px; width: 64px; height: 64px; object-fit: cover; border-radius: 8px; background: #fff; }
.preview.splash { width: 100%; height: 96px; }
.ad-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 8px; }
.ad-col { background: #f7f9fb; border: 1px solid #e6ebf0; border-radius: 8px; padding: 12px 12px 4px; }
.ad-col-title { font-weight: 700; color: #16324f; margin-bottom: 8px; }
.ad-col .el-form-item { margin-bottom: 10px; }
.build-running { color: #e6a23c; font-weight: 600; line-height: 32px; }
.upload-progress-text { color: #409eff; font-weight: 600; font-size: 13px; line-height: 32px; }
.dialog-upload-progress { flex: 1; margin-right: 16px; text-align: left; min-width: 200px; }
.el-dialog__footer { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.status-wait {
  display: inline-block; padding: 2px 10px; border-radius: 12px;
  background: #f0f2f5; color: #909399; font-size: 12px;
}
.status-ok {
  display: inline-block; padding: 2px 10px; border-radius: 12px;
  background: #f0f9eb; color: #67c23a; font-size: 12px; font-weight: 600;
}
.status-fail {
  display: inline-block; padding: 2px 10px; border-radius: 12px;
  background: #fef0f0; color: #f56c6c; font-size: 12px; font-weight: 600;
}
.status-queue {
  display: inline-block; padding: 2px 10px; border-radius: 12px;
  background: #fdf6ec; color: #e6a23c; font-size: 12px; font-weight: 600;
}
.status-building {
  display: inline-flex; align-items: center; gap: 6px;
  color: #409eff; font-size: 13px; font-weight: 600;
}
.status-spin {
  width: 14px; height: 14px; border: 2px solid #d9ecff; border-top-color: #409eff;
  border-radius: 50%; animation: status-rotate 0.8s linear infinite;
}
@keyframes status-rotate { to { transform: rotate(360deg); } }
.aab-download-cell {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 2px 0;
}
.aab-file-name {
  color: #7b8794; font-size: 12px; max-width: 108px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.aab-file-empty { color: #c0c4cc; }
.aab-gen-time { color: #606266; font-size: 13px; white-space: nowrap; }
.build-list-icon {
  width: 64px; height: 64px; object-fit: cover; border-radius: 14px;
  background: #f4f6f8; display: block; margin: 4px auto;
}
.store-play-link { color: #409eff; text-decoration: none; cursor: pointer; }
.store-play-link:hover { text-decoration: underline; }
.build-icon-spin {
  position: absolute; inset: 0; z-index: 5;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.55);
}
.build-icon-spin .status-spin { width: 28px; height: 28px; border-width: 3px; }
.el-table__body tr.build-row-locked > td,
.el-table__fixed-right tr.build-row-locked > td,
.el-table__fixed-body-wrapper tr.build-row-locked > td {
  position: relative;
  pointer-events: none;
}
.el-table__body tr.build-row-locked > td::after,
.el-table__fixed-right tr.build-row-locked > td::after,
.el-table__fixed-body-wrapper tr.build-row-locked > td::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.72);
  z-index: 3;
}
.el-table__body tr.build-row-locked > td.build-icon-col .cell,
.el-table__body tr.build-row-locked > td.build-status-col .cell,
.el-table__fixed-right tr.build-row-locked > td.build-status-col .cell,
.el-table__fixed-body-wrapper tr.build-row-locked > td.build-status-col .cell {
  position: relative;
  z-index: 4;
}
.menu-perm-box {
  width: 100%;
  max-height: 360px;
  overflow: auto;
  padding: 10px 12px;
  background: #f7f9fb;
  border: 1px solid #e6ebf0;
  border-radius: 8px;
}
.menu-perm-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
}
.menu-perm-group .el-checkbox {
  margin-right: 0;
  height: auto;
  white-space: normal;
}
.sop-boards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.sop-board { background: #f7f9fb; border: 1px solid #e6ebf0; border-radius: 8px; padding: 12px; max-height: 220px; overflow: auto; }
.sop-board-warn { background: #fff7ed; border-color: #fed7aa; }
.sop-board-title { font-weight: 700; color: #16324f; margin-bottom: 8px; }
.sop-person { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 8px; }
.sop-count { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: #16324f; color: #fff; font-size: 12px; line-height: 22px; text-align: center; }
.sop-chip { display: inline-block; max-width: 100%; padding: 2px 8px; border-radius: 10px; background: #e8eef5; color: #16324f; font-size: 12px; line-height: 20px; }
.sop-chip.is-bad { background: #fee2e2; color: #991b1b; }
.sop-claims { display: flex; flex-wrap: wrap; gap: 4px; }
.sop-missing { color: #b45309; }
.sop-optimize-item { grid-column: 1 / -1; }
.sop-opt-preview { display: inline-block; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: default; border-bottom: 1px dashed #8aa0b8; vertical-align: bottom; }
.sop-opt-pop { white-space: pre-wrap; line-height: 1.6; color: #16324f; }
.sop-opt-pop-title { font-weight: 700; margin-bottom: 6px; }
.el-select-dropdown__header { padding: 6px 8px 4px; }
.sop-role-hint { flex-basis: 100%; line-height: 1.6; }
.sop-date-col .cell { overflow: visible; }
.sop-date-popper { z-index: 4000; }
@media (max-width: 1100px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sider { width: 200px; }
}
