/* VSport-Admin · 代理列表 */

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: #303133;
  background: #f0f2f5;
  font-size: 13px;
}
button, input, select { font-family: inherit; }
button { cursor: pointer; }
.layout { display: flex; height: 100vh; overflow: hidden; }

/* ===== Sidebar ===== */
.sidebar {
  width: 208px;
  flex-shrink: 0;
  background: linear-gradient(180deg, #1b2438 0%, #151c2c 100%);
  color: #c5cde0;
  display: flex;
  flex-direction: column;
  transition: width .2s ease;
}
.sidebar.collapsed { width: 0; overflow: hidden; }
.logo {
  height: 52px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.06);
  flex-shrink: 0;
}
.logo-mark {
  width: 26px; height: 26px; border-radius: 6px;
  background: #2f6bff; color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px;
}
.menu { padding: 8px 0 16px; overflow: auto; flex: 1; }
.menu-item {
  padding: 10px 16px;
  display: flex; align-items: center; gap: 8px;
  cursor: default; color: #aeb8cc; font-size: 13px;
}
.menu-item .mi { width: 16px; text-align: center; opacity: .75; }
.menu-item .arrow { margin-left: auto; font-size: 10px; opacity: .6; }
.menu-item.active-parent { color: #fff; }
.menu-badge {
  margin-left: auto;
  min-width: 18px; height: 18px; padding: 0 6px;
  border-radius: 9px; background: #fa8c16; color: #fff;
  font-size: 11px; font-weight: 600; line-height: 18px; text-align: center;
}
.menu-item:has(.menu-badge) .arrow,
.sub-item .menu-badge + .arrow { margin-left: 6px; }
.sub { background: rgba(0,0,0,.15); padding: 4px 0 8px; }
.sub-item {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 16px 8px 42px;
  color: #9aa6bf; text-decoration: none; font-size: 12px;
}
.sub-item:hover { color: #fff; }
.sub-item.active {
  color: #fff; background: #1890ff;
  margin: 2px 8px; border-radius: 2px; padding-left: 34px;
}
.sub-item .si { width: 14px; text-align: center; opacity: .7; flex-shrink: 0; }
.sub-item .arrow { margin-left: auto; font-size: 10px; opacity: .55; }
.sub-item .menu-badge { margin-left: auto; }
.sub-nest > .sub-item.nest-hd { color: #c5cde0; font-weight: 500; cursor: pointer; }
.sub-nest .sub-deep .sub-item { padding-left: 54px; padding-right: 10px; }
.sub-nest .sub-deep .sub-item.active { padding-left: 46px; }
.menu-group:not(.open) > .sub,
.sub-nest:not(.open) > .sub-deep { display: none; }
.menu-group > .menu-item,
.sub-nest > .sub-item.nest-hd { cursor: pointer; user-select: none; }

/* ===== Main ===== */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; background: #f0f2f5; }
.topbar {
  height: 48px; background: #fff; border-bottom: 1px solid #e8ecf2;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px; flex-shrink: 0;
}
.top-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.fold-btn, .icon-btn {
  border: 0; background: transparent; color: #606266;
  width: 28px; height: 28px; border-radius: 4px;
  display: inline-flex; align-items: center; justify-content: center;
}
.fold-btn:hover, .icon-btn:hover { background: #f5f7fa; color: #1890ff; }
.crumb { color: #909399; font-size: 13px; display: flex; align-items: center; gap: 6px; }
.crumb .now { color: #303133; }
.top-actions { display: flex; align-items: center; gap: 6px; }
.text-btn {
  border: 0; background: transparent; color: #606266;
  height: 32px; padding: 0 8px; border-radius: 4px;
  display: inline-flex; align-items: center; gap: 4px; font-size: 13px; position: relative;
}
.text-btn:hover { background: #f5f7fa; color: #1890ff; }
.badge {
  min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px;
  background: #f56c6c; color: #fff; font-style: normal; font-size: 11px;
  line-height: 16px; text-align: center; font-weight: 600;
}
.dl-wrap { position: relative; }
.dl-count { color: #909399; font-weight: 500; }
.caret { font-size: 10px; color: #c0c4cc; }
.dl-pop {
  position: absolute; right: 0; top: 36px; width: 280px;
  background: #fff; border: 1px solid #ebeef5; border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12); z-index: 20; padding: 8px 0;
}
.dl-pop[hidden] { display: none !important; }
.dl-pop .hd { padding: 4px 14px 8px; color: #909399; font-size: 12px; }
.dl-pop li { list-style: none; padding: 8px 14px; font-size: 13px; color: #303133; }
.dl-pop li span { display: block; color: #909399; font-size: 12px; margin-top: 2px; }
.dl-pop ul { margin: 0; padding: 0; }
.dl-empty { padding: 16px 14px; color: #c0c4cc; text-align: center; }
.status-dot {
  width: 18px; height: 18px; border-radius: 50%; background: #f56c6c; margin: 0 4px;
}
.avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, #ffd6a8, #f5b7b1 40%, #7eb6ff);
  border: 1px solid #f0f0f0;
}

.tabs {
  background: #fff; padding: 6px 12px 0;
  border-bottom: 1px solid #e4e7ed;
  display: flex; gap: 6px; align-items: flex-end; flex-shrink: 0;
}
.tab {
  padding: 6px 12px; color: #606266; font-size: 13px;
  border: 1px solid transparent; border-bottom: 0; border-radius: 4px 4px 0 0;
  background: transparent; display: inline-flex; align-items: center; gap: 6px;
}
.tab.on {
  color: #1890ff; background: #fff; border-color: #e4e7ed;
  position: relative; top: 1px;
}
.tab .dot { width: 8px; height: 8px; border-radius: 50%; background: #1890ff; }
.tab em { font-style: normal; color: #c0c4cc; font-size: 14px; line-height: 1; }
.tab em:hover { color: #1890ff; }

.content { flex: 1; overflow: auto; padding: 12px 12px 20px; }

.panel {
  background: #fff; border-radius: 2px; margin-bottom: 12px;
}

/* ===== Filter ===== */
.filter-panel { padding: 16px 18px 14px; }
.filter-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr 1fr;
  gap: 14px 18px;
  align-items: center;
}
.field { display: flex; align-items: center; gap: 8px; min-width: 0; }
.field.span2 { grid-column: span 2; }
.flabel {
  flex-shrink: 0; width: 92px; text-align: right;
  color: #606266; font-size: 13px;
}
.field input[type="text"],
.field select {
  flex: 1; min-width: 0; height: 32px;
  border: 1px solid #dcdfe6; border-radius: 4px;
  padding: 0 10px; font-size: 13px; color: #303133; background: #fff;
}
.field input::placeholder { color: #c0c4cc; }
.field input:focus, .field select:focus {
  outline: none; border-color: #1890ff;
}
.range-box {
  flex: 1; min-width: 0; height: 32px;
  border: 1px solid #dcdfe6; border-radius: 4px; background: #fff;
  display: flex; align-items: center; padding: 0 8px; gap: 6px;
}
.range-box:focus-within { border-color: #1890ff; }
.range-dot {
  width: 14px; height: 14px; border-radius: 50%;
  border: 1px solid #dcdfe6; flex-shrink: 0;
}
.range-box input {
  border: 0 !important; height: 28px !important; padding: 0 !important;
  flex: 1; min-width: 0; background: transparent; box-shadow: none;
}
.range-box .sep { color: #c0c4cc; flex-shrink: 0; }
.account-ctl { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; }
.account-ctl input { max-width: 200px; }
.radios { display: flex; align-items: center; gap: 14px; flex-shrink: 0; color: #606266; white-space: nowrap; }
.radios label { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.radios input { accent-color: #1890ff; }
.btns { display: flex; align-items: center; gap: 10px; }
.btn {
  height: 32px; padding: 0 14px; border-radius: 4px;
  border: 1px solid #dcdfe6; background: #fff; color: #606266;
  font-size: 13px; display: inline-flex; align-items: center; gap: 4px;
}
.btn:hover { color: #1890ff; border-color: #1890ff; }
.btn-primary { background: #1890ff; border-color: #1890ff; color: #fff; }
.btn-primary:hover { background: #40a9ff; border-color: #40a9ff; color: #fff; }
.btn-export { background: #fa8c16; border-color: #fa8c16; color: #fff; }
.btn-export:hover { background: #ffa940; border-color: #ffa940; color: #fff; }
.btn svg { display: block; }

/* ===== Table ===== */
.table-panel { padding-bottom: 4px; }
.table-scroll { overflow-x: auto; }
.data-table { width: max-content; min-width: 100%; border-collapse: collapse; }
.data-table th, .data-table td {
  padding: 11px 12px; text-align: left; white-space: nowrap;
  border-bottom: 1px solid #ebeef5; font-weight: 400; font-size: 13px;
}
.data-table th {
  background: #fafafa; color: #909399; font-weight: 500;
  position: sticky; top: 0;
}
.data-table td { color: #606266; }
.data-table tbody tr:hover td { background: #f5f7fa; }
.data-table .empty { text-align: center; color: #c0c4cc; padding: 40px 0; }
.st {
  display: inline-block; min-width: 40px; text-align: center;
  padding: 0 8px; height: 22px; line-height: 20px;
  border-radius: 4px; font-size: 12px;
  color: #67c23a; background: #f0f9eb; border: 1px solid #e1f3d8;
}
.st.off { color: #f56c6c; background: #fef0f0; border-color: #fde2e2; }
.num-link { color: #1890ff; text-decoration: none; }
.num-link:hover { text-decoration: underline; }

/* ===== Pager ===== */
.pager {
  display: flex; justify-content: center; align-items: center;
  gap: 12px; padding: 14px 12px 12px; color: #606266; flex-wrap: wrap;
}
.pager select, .pager .jump input {
  height: 28px; border: 1px solid #dcdfe6; border-radius: 4px;
  padding: 0 8px; color: #606266; background: #fff; font-size: 13px;
}
.pages { display: flex; align-items: center; gap: 4px; }
.pages button {
  min-width: 30px; height: 28px; padding: 0 6px;
  border: 0; background: transparent; color: #606266; border-radius: 2px; font-size: 13px;
}
.pages button:hover:not(:disabled) { color: #1890ff; }
.pages button.on { background: #1890ff; color: #fff; }
.pages button:disabled { color: #c0c4cc; cursor: not-allowed; }
.pages .ellipsis { color: #c0c4cc; padding: 0 4px; }
.jump { display: inline-flex; align-items: center; gap: 6px; }
.jump input { width: 46px; text-align: center; }

.toast {
  position: fixed; top: 20px; left: 50%; transform: translateX(-50%);
  background: #fff; color: #303133; border-radius: 4px;
  box-shadow: 0 6px 16px rgba(0,0,0,.12); padding: 10px 16px;
  z-index: 50; font-size: 13px; border: 1px solid #ebeef5;
}
.toast[hidden] { display: none !important; }

@media (max-width: 1200px) {
  .filter-grid { grid-template-columns: 1fr 1fr; }
  .account-ctl { flex-wrap: wrap; }
  .account-ctl input { max-width: none; }
}

/* ===== 新增代理 ===== */
body.page-create .main,
body.page-create .content { background: #fff; }
.tab-link { text-decoration: none; }
.wizard {
  width: 640px;
  max-width: 100%;
  margin: 28px auto 40px;
}
.steps {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  margin-bottom: 36px;
}
.step {
  width: 88px;
  text-align: center;
  background: none;
  border: 0;
  padding: 0;
  color: #909399;
}
.step .num {
  width: 36px;
  height: 36px;
  margin: 0 auto 8px;
  border-radius: 50%;
  border: 1px solid #dcdfe6;
  background: #fff;
  color: #c0c4cc;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}
.step.on { color: #303133; }
.step.on .num { background: #1890ff; border-color: #1890ff; color: #fff; }
.step-line {
  width: 120px;
  border-top: 1px dashed #dcdfe6;
  margin-top: 18px;
}
.create-form { width: 460px; margin: 0 auto; }
.create-row {
  display: flex;
  align-items: flex-start;
  margin-bottom: 18px;
}
.create-label {
  width: 96px;
  flex-shrink: 0;
  text-align: right;
  line-height: 32px;
  color: #606266;
  padding-right: 12px;
}
.create-label .req { color: #f56c6c; margin-right: 2px; }
.create-ctl { flex: 1; min-width: 0; position: relative; }
.create-ctl input,
.combo-btn {
  width: 100%;
  height: 32px;
  border: 1px solid #dcdfe6;
  border-radius: 4px;
  padding: 0 12px;
  font-size: 13px;
  color: #303133;
  background: #fff;
}
.create-ctl input::placeholder { color: #c0c4cc; }
.create-ctl input:focus,
.combo.open .combo-btn { outline: none; border-color: #1890ff; }
.combo-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  text-align: left;
}
.combo-btn .caret { color: #c0c4cc; font-size: 12px; }
.combo-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: 36px;
  background: #fff;
  border: 1px solid #e4e7ed;
  border-radius: 4px;
  box-shadow: 0 2px 12px rgba(0,0,0,.1);
  z-index: 5;
  padding: 6px 0;
}
.combo-menu[hidden] { display: none !important; }
.combo-menu button {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 8px 16px;
  font-size: 13px;
  color: #606266;
}
.combo-menu button:hover,
.combo-menu button.on { background: #f5f7fa; color: #1890ff; }
.field-err { color: #f56c6c; font-size: 12px; line-height: 18px; }
.field-err:empty { display: none; }
.create-actions { padding-left: 96px; margin-top: 8px; display: flex; gap: 12px; }
.create-actions .btn { min-width: 88px; justify-content: center; }
.done-box { text-align: center; padding: 24px 0 8px; color: #303133; }
.done-box h2 { margin: 12px 0 8px; font-size: 18px; font-weight: 600; }
.done-box p { margin: 0 0 18px; color: #909399; }
.done-mark {
  width: 48px; height: 48px; border-radius: 50%; margin: 0 auto;
  background: #f0f9eb; color: #67c23a; font-size: 26px;
  display: flex; align-items: center; justify-content: center;
}
