/* VSport-Admin · 会员列表原型样式 */

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: #1f2a44;
  background: #f0f2f5;
  font-size: 13px;
}

.layout { display: flex; min-height: 100vh; }

/* ===== Sidebar ===== */
.sidebar {
  width: 210px;
  flex-shrink: 0;
  background: linear-gradient(180deg, #1b2438 0%, #151c2c 100%);
  color: #c5cde0;
  display: flex;
  flex-direction: column;
}
.logo {
  height: 56px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 18px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.logo-mark {
  width: 28px; height: 28px; border-radius: 6px;
  background: #2f6bff; color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700;
}
.menu { padding: 10px 0; overflow: auto; flex: 1; }
.menu-item {
  padding: 10px 18px;
  display: flex; align-items: center; gap: 8px;
  cursor: default; color: #aeb8cc; font-size: 13px;
}
.menu-item .mi { width: 16px; text-align: center; opacity: .7; }
.menu-item .arrow { margin-left: auto; font-size: 10px; opacity: .6; }
.menu-item.active-parent { color: #fff; background: rgba(47,107,255,.12); }
.sub { background: rgba(0,0,0,.15); padding: 4px 0 8px; }
.sub-item {
  display: block;
  padding: 8px 18px 8px 42px;
  color: #9aa6bf;
  text-decoration: none;
  font-size: 12px;
}
.sub-item:hover { color: #fff; }
.sub-item.active {
  color: #fff;
  background: #2f6bff;
  border-radius: 4px;
  margin: 2px 10px;
  padding-left: 32px;
}

/* ===== Main ===== */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 48px;
  background: #fff;
  border-bottom: 1px solid #e8ecf2;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px;
}
.crumb { color: #8892a8; font-size: 12px; }
.top-actions { display: flex; align-items: center; gap: 14px; }
.icon-btn { cursor: default; opacity: .7; }
.avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: #2f6bff; color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600;
}
.tabs {
  background: #fff;
  padding: 0 16px;
  border-bottom: 1px solid #e8ecf2;
  display: flex; gap: 4px;
}
.tab {
  padding: 10px 14px;
  color: #667085;
  font-size: 13px;
  border-bottom: 2px solid transparent;
}
.tab.on {
  color: #2f6bff;
  border-bottom-color: #2f6bff;
  font-weight: 500;
}
.tab i { font-style: normal; margin-left: 6px; color: #99a; }

.content { padding: 16px 20px 40px; }
.back-link {
  display: inline-block;
  margin-bottom: 10px;
  color: #2f6bff;
  text-decoration: none;
  font-size: 13px;
}
.back-link:hover { text-decoration: underline; }

.change-banner {
  background: #fff7e6;
  border: 1px solid #ffd591;
  color: #874d00;
  padding: 10px 14px;
  border-radius: 6px;
  margin-bottom: 12px;
  line-height: 1.6;
  font-size: 13px;
}
.change-banner b { color: #d46b08; }

.panel {
  background: #fff;
  border: 1px solid #e8ecf2;
  border-radius: 6px;
  margin-bottom: 12px;
}

/* ===== Filter：左右横排 ===== */
.filter-panel { padding: 16px 16px 10px; }
.filter-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px 20px;
}
.field {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.field.span2 { grid-column: span 2; }
.field .flabel {
  flex-shrink: 0;
  width: 84px;
  text-align: right;
  color: #5a6478;
  font-size: 13px;
  line-height: 32px;
}
.field input,
.field select {
  flex: 1;
  min-width: 0;
  height: 32px;
  border: 1px solid #d9dee8;
  border-radius: 4px;
  padding: 0 10px;
  font-size: 13px;
  color: #1f2a44;
  background: #fff;
}
.field input:focus,
.field select:focus {
  outline: none;
  border-color: #2f6bff;
  box-shadow: 0 0 0 2px rgba(47,107,255,.12);
}
.range {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.range span { color: #99a; flex-shrink: 0; }
.range input { flex: 1; min-width: 0; }

/* 日期时间范围触发器 */
.dt-trigger {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  border: 1px solid #d9dee8;
  border-radius: 4px;
  padding: 0 8px;
  background: #fff;
  cursor: pointer;
}
.dt-trigger:hover,
.dt-trigger:focus-within {
  border-color: #2f6bff;
  box-shadow: 0 0 0 2px rgba(47,107,255,.12);
}
.dt-trigger input {
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  height: 30px !important;
  background: transparent;
  cursor: pointer;
  flex: 1;
  min-width: 0;
  font-size: 12px;
}
.dt-trigger span { color: #99a; flex-shrink: 0; }
.dt-icon { font-size: 12px; opacity: .55; }

/* 日期时间面板 */
.dt-mask {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: transparent;
}
.dt-mask[hidden] { display: none !important; }
.dt-panel {
  position: absolute;
  display: flex;
  background: #fff;
  border: 1px solid #e8ecf2;
  border-radius: 6px;
  box-shadow: 0 8px 28px rgba(0,0,0,.16);
  overflow: hidden;
  min-width: 680px;
}
.dt-side {
  width: 110px;
  border-right: 1px solid #eef1f6;
  padding: 8px 0;
  background: #fafbfc;
  flex-shrink: 0;
}
.dt-side button {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 8px 16px;
  font-size: 13px;
  color: #1f2a44;
  cursor: pointer;
}
.dt-side button:hover,
.dt-side button.on {
  color: #2f6bff;
  background: #eef3ff;
}
.dt-main { flex: 1; padding: 12px 14px 12px; min-width: 0; }
.dt-inputs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.dt-inputs input {
  height: 30px;
  border: 1px solid #d9dee8;
  border-radius: 4px;
  padding: 0 8px;
  font-size: 12px;
  width: 110px;
}
.dt-inputs input:focus {
  outline: none;
  border-color: #2f6bff;
}
.dt-sep { color: #99a; }
.dt-cals {
  display: flex;
  gap: 16px;
}
.dt-cal { flex: 1; min-width: 240px; }
.dt-cal-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #1f2a44;
}
.dt-cal-hd .nav {
  display: flex;
  gap: 4px;
}
.dt-cal-hd button {
  border: 0;
  background: transparent;
  cursor: pointer;
  color: #667085;
  font-size: 14px;
  padding: 2px 6px;
  border-radius: 3px;
}
.dt-cal-hd button:hover { background: #f5f7fb; color: #2f6bff; }
.dt-week,
.dt-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
}
.dt-week span {
  font-size: 12px;
  color: #8892a8;
  padding: 6px 0;
}
.dt-days button {
  border: 0;
  background: transparent;
  height: 30px;
  border-radius: 4px;
  font-size: 12px;
  color: #1f2a44;
  cursor: pointer;
}
.dt-days button:hover { background: #eef3ff; color: #2f6bff; }
.dt-days button.other { color: #c0c6d4; }
.dt-days button.in-range { background: #e6f4ff; border-radius: 0; }
.dt-days button.start,
.dt-days button.end {
  background: #2f6bff;
  color: #fff;
  border-radius: 4px;
}
.dt-days button.start.end { border-radius: 4px; }
.dt-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #eef1f6;
}

.filter-tips {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed #eef1f6;
  font-size: 12px;
  color: #8892a8;
}
.filter-tips code {
  background: #f5f7fb;
  border: 1px solid #e8ecf2;
  border-radius: 3px;
  padding: 1px 6px;
  color: #2f6bff;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
}

/* ===== Action bar ===== */
.action-bar {
  padding: 12px 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.btn {
  height: 32px;
  padding: 0 14px;
  border: 1px solid #d9dee8;
  border-radius: 4px;
  background: #fff;
  color: #1f2a44;
  font-size: 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.btn:hover { border-color: #2f6bff; color: #2f6bff; }
.btn:disabled { opacity: .45; cursor: not-allowed; color: inherit; border-color: #d9dee8; }
.btn.sm { height: 28px; padding: 0 10px; min-width: 28px; justify-content: center; }
.btn.sm.on { background: #2f6bff; color: #fff; border-color: #2f6bff; }
.btn-primary {
  background: #2f6bff;
  border-color: #2f6bff;
  color: #fff;
}
.btn-primary:hover { background: #1f5aef; color: #fff; border-color: #1f5aef; }
.btn-agent {
  background: #fff;
  border: 1px solid #2f6bff;
  color: #2f6bff;
  font-weight: 500;
}
.btn-agent:hover { background: #eef3ff; }

/* 本次需求新增：虚线红框 */
.req-new-box {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: 4px;
  padding: 8px 12px;
  border: 2px dashed #f5222d;
  border-radius: 6px;
  background: #fff7f7;
  position: relative;
}
.req-new-tag {
  position: absolute;
  top: -9px;
  left: 10px;
  background: #fff;
  color: #f5222d;
  font-size: 11px;
  font-weight: 600;
  padding: 0 6px;
  line-height: 1.2;
}

.batch-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 8px;
  padding-left: 12px;
  border-left: 1px dashed #d9dee8;
}
.batch-select {
  height: 32px;
  min-width: 180px;
  border: 1px solid #d9dee8;
  border-radius: 4px;
  padding: 0 10px;
  font-size: 13px;
  color: #1f2a44;
  background: #fff;
}
.hint-chip {
  font-size: 11px;
  color: #8892a8;
  background: #f5f7fb;
  border: 1px solid #e8ecf2;
  border-radius: 10px;
  padding: 2px 8px;
}
.hint-chip.agent {
  color: #d46b08;
  background: #fff7e6;
  border-color: #ffd591;
}

/* ===== Select status ===== */
.select-status {
  background: #e6f4ff;
  border: 1px solid #91caff;
  border-radius: 6px;
  padding: 8px 14px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #0958d9;
  font-size: 13px;
}
.select-status b { color: #003eb3; }
.select-status b.all { color: #d46b08; font-size: 14px; }
.mode-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 3px;
  background: #fff7e6;
  border: 1px solid #ffd591;
  color: #d46b08;
  font-size: 11px;
}
.warn { color: #cf1322; margin-left: 4px; }
.link-btn {
  background: none;
  border: none;
  color: #2f6bff;
  cursor: pointer;
  font-size: 13px;
  padding: 0;
  text-decoration: underline;
}

/* ===== Table ===== */
.table-panel { padding: 0; overflow: hidden; }
.table-scroll { overflow: auto; max-height: calc(100vh - 460px); min-height: 280px; }
.data-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
}
.data-table th,
.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #eef1f6;
  white-space: nowrap;
  text-align: center;
  font-size: 12px;
}
.data-table th {
  background: #f7f9fc;
  color: #3d4a66;
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 2;
}
.data-table td { color: #1f2a44; }
.data-table tbody tr:hover { background: #f5f8ff; }
.col-check { width: 44px; }
.link { color: #2f6bff; text-decoration: none; }
.link:hover { text-decoration: underline; }
.op { font-weight: 500; }
.ellipsis {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.empty-row {
  text-align: center !important;
  color: #8892a8;
  padding: 40px 12px !important;
}
.tag {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 3px;
  font-size: 12px;
}
.tag.blue { background: #e6f4ff; color: #1677ff; border: 1px solid #91caff; }
.tag.gray { background: #f5f5f5; color: #595959; border: 1px solid #d9d9d9; }
.badge.green {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 3px;
  background: #f6ffed;
  color: #389e0d;
  border: 1px solid #b7eb8f;
}
.vip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 4px;
  background: #f5222d;
  color: #fff;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 600;
}
.sticky-right {
  position: sticky;
  right: 0;
  background: #fff;
  box-shadow: -4px 0 8px rgba(0,0,0,.04);
  z-index: 1;
}
thead .sticky-right { background: #f7f9fc; z-index: 3; }

/* ===== Pager ===== */
.pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid #eef1f6;
  color: #1f2a44;
  font-size: 13px;
}
.pager-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.pager-total {
  color: #1f2a44;
  white-space: nowrap;
}
.pager-total b {
  font-weight: 600;
  margin: 0 2px;
}
.pager-btns { display: flex; align-items: center; gap: 6px; }
.pager-ellipsis { color: #99a; padding: 0 2px; }
.page-size-wrap { position: relative; }
.page-size-btn {
  min-width: 88px;
  justify-content: space-between;
}
.page-size-menu {
  position: absolute;
  bottom: 34px;
  left: 0;
  background: #fff;
  border: 1px solid #e8ecf2;
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  min-width: 110px;
  z-index: 20;
  overflow: hidden;
}
.page-size-menu button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: #fff;
  padding: 8px 12px;
  font-size: 13px;
  cursor: pointer;
  color: #1f2a44;
}
.page-size-menu button:hover { background: #f5f8ff; color: #2f6bff; }
.pager-jump {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #1f2a44;
}
.pager-jump input {
  width: 48px;
  height: 28px;
  border: 1px solid #d9dee8;
  border-radius: 4px;
  text-align: center;
  font-size: 13px;
}

/* ===== Modal ===== */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 24px;
}
.modal-mask[hidden] { display: none !important; }
.modal {
  width: 420px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 12px 40px rgba(0,0,0,.18);
  overflow: hidden;
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
}
.modal.agent-modal { width: 560px; }
.modal-hd {
  padding: 14px 20px;
  border-bottom: 1px solid #eef1f6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.modal-title { font-size: 16px; font-weight: 600; text-align: center; flex: 1; }
.modal-x {
  border: 0;
  background: none;
  font-size: 20px;
  color: #99a;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
}
.modal-x:hover { color: #333; }
.modal-body {
  padding: 20px 24px;
  line-height: 1.7;
  color: #1f2a44;
  overflow: auto;
}
.modal-body .muted { color: #8892a8; font-size: 12px; }
.modal-ft {
  padding: 12px 24px 16px;
  display: flex;
  justify-content: flex-start;
  gap: 8px;
  border-top: 1px solid #eef1f6;
  flex-shrink: 0;
}

/* 对齐线上：标签在上、控件在下 */
.form-item { margin-bottom: 18px; }
.form-item:last-child { margin-bottom: 0; }
.form-item-label {
  font-size: 14px;
  color: #1f2a44;
  margin-bottom: 8px;
  line-height: 1.4;
}
.form-item-label strong { font-weight: 700; }
.form-item.inline {
  display: flex;
  align-items: center;
  gap: 12px;
}
.form-item.inline .form-item-label {
  margin-bottom: 0;
  flex-shrink: 0;
  white-space: nowrap;
  line-height: 32px;
}
.form-item.inline .input.full {
  flex: 1;
  min-width: 0;
}
.input.full {
  width: 100%;
  height: 32px;
  border: 1px solid #d9dee8;
  border-radius: 4px;
  padding: 0 10px;
  font-size: 13px;
}
.textarea-wrap { position: relative; }
.textarea-wrap .char-count {
  position: absolute;
  right: 10px;
  bottom: 8px;
  margin: 0;
  background: #fff;
  padding: 0 2px;
}

.scope-box {
  background: #f5f7fb;
  border: 1px solid #e8ecf2;
  border-radius: 6px;
  padding: 10px 12px;
  margin-top: 10px;
  font-size: 13px;
}
.scope-box.all {
  background: #fff7e6;
  border-color: #ffd591;
  color: #874d00;
}

.pick-table-wrap {
  border: 1px solid #e8ecf2;
  border-radius: 4px;
  overflow: auto;
  max-height: 200px;
  min-height: 120px;
}
.pick-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.pick-table th,
.pick-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #eef1f6;
  text-align: left;
  white-space: nowrap;
}
.pick-table th {
  background: #fafafa;
  color: #3d4a66;
  font-weight: 600;
  position: sticky;
  top: 0;
}
.pick-empty {
  padding: 36px 16px;
  text-align: center;
  color: #8892a8;
  font-size: 13px;
}
.pick-sum {
  margin-top: 8px;
  font-size: 13px;
  color: #1f2a44;
}
.pick-sum b { font-weight: 600; }

.textarea {
  width: 100%;
  border: 1px solid #d9dee8;
  border-radius: 4px;
  padding: 8px 10px;
  font-size: 13px;
  font-family: inherit;
  resize: vertical;
  line-height: 1.5;
}
.textarea:focus,
.input.full:focus {
  outline: none;
  border-color: #2f6bff;
  box-shadow: 0 0 0 2px rgba(47,107,255,.12);
}
.manual-preview {
  margin-top: 8px;
  font-size: 12px;
  color: #667085;
  line-height: 1.8;
}
.manual-preview code {
  background: #f5f7fb;
  border: 1px solid #e8ecf2;
  border-radius: 3px;
  padding: 1px 6px;
  margin-right: 4px;
  color: #1f2a44;
}

.req { color: #f5222d; margin-right: 2px; }
.char-count {
  text-align: right;
  font-size: 12px;
  color: #8892a8;
  margin-top: 4px;
}

/* ===== Toast ===== */
.toast {
  position: fixed;
  top: 72px;
  left: 50%;
  transform: translateX(-50%);
  background: #1f2a44;
  color: #fff;
  padding: 10px 18px;
  border-radius: 6px;
  z-index: 1100;
  font-size: 13px;
  box-shadow: 0 8px 24px rgba(0,0,0,.2);
  max-width: 90vw;
}
.toast.warn { background: #d46b08; }
.toast[hidden] { display: none !important; }

@media (max-width: 1400px) {
  .filter-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 960px) {
  .sidebar { display: none; }
  .filter-grid { grid-template-columns: 1fr; }
  .field .flabel { width: 72px; }
  .modal.agent-modal { width: 100%; }
}
