:root {
  --topbar-h: 64px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #e2e8f0;
  min-height: 100vh;
}

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  border-bottom: 1px solid #334155;
}
.tab-btn {
  padding: 8px 16px;
  border: none;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  border-radius: 4px 4px 0 0;
  transition: all 0.2s;
  font-size: 14px;
}
.tab-btn:hover {
  background: rgba(59, 130, 246, 0.1);
  color: #60a5fa;
}
.tab-btn.active {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border-bottom: 2px solid #3b82f6;
}
.tab-content {
  display: none;
}
.tab-content.active {
  display: block;
}

/* 统一输入框样式 */
.form-input, .form-select {
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid #334155;
  background: #1e293b;
  color: #e2e8f0;
  outline: none;
  transition: all 0.2s;
  font-size: 14px;
}
.form-input:focus, .form-select:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}
.form-input::placeholder {
  color: #64748b;
}

/* 小按钮 */
.btn-sm {
  padding: 4px 10px;
  font-size: 12px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--topbar-h);
  padding: 0 32px;
  background: rgba(15, 23, 42, 0.85);
  border-bottom: 2px solid #334155;
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand { display: flex; align-items: center; gap: 14px; }
.logo {
  font-size: 32px;
  color: #38bdf8;
  text-shadow: 0 0 18px rgba(56, 189, 248, 0.5);
}
.brand h1 { margin: 0; font-size: 20px; color: #f1f5f9; }
.subtitle { margin: 4px 0 0; font-size: 13px; color: #94a3b8; }

.user-session {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: #cbd5e1;
}
.user-session .whoami {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px 32px;
}

/* ===== 管理员视图：侧栏固定贴边 + 内容平铺全屏 ===== */
body.is-admin-view .container {
  max-width: none;
  margin: 0;
  padding: 0;
}
body.is-admin-view .topbar {
  /* topbar 左右到头，不为侧栏留出空间（sidebar 从 topbar 下方开始） */
  padding-left: 32px;
  padding-right: 32px;
}

.view { display: none; }
.view.active { display: block; }

.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeIn 0.2s ease-in; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===== 左侧边栏 + 右侧主区 布局 ===== */
.admin-layout {
  display: flex;
  width: 100%;
  gap: 0;
}
.admin-sidebar {
  position: fixed;
  left: 0;
  top: var(--topbar-h);
  bottom: 0;
  width: 220px;
  height: calc(100vh - var(--topbar-h));
  background: rgba(30, 41, 59, 0.92);
  border-right: 1px solid #334155;
  border-radius: 0;
  padding: 22px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
  z-index: 30;
  backdrop-filter: blur(10px);
  box-shadow: 2px 0 20px rgba(0, 0, 0, 0.25);
}
.sidebar-title {
  padding: 8px 14px 14px;
  color: #38bdf8;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 2px;
  border-bottom: 1px solid #334155;
  margin-bottom: 10px;
  text-transform: uppercase;
}
.admin-sidebar .sidebar-item {
  padding: 12px 16px;
  background: transparent;
  color: #cbd5e1;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  text-align: left;
  transition: all 0.18s;
  display: flex;
  align-items: center;
  gap: 10px;
}
.admin-sidebar .sidebar-item .si-ic { font-size: 16px; }
.admin-sidebar .sidebar-item:hover {
  color: #f1f5f9;
  background: rgba(56, 189, 248, 0.10);
  border-color: rgba(56, 189, 248, 0.35);
}
.admin-sidebar .sidebar-item.active {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.18), rgba(56, 189, 248, 0.06));
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.55);
  font-weight: 600;
  box-shadow: inset 3px 0 0 #38bdf8;
}
.sidebar-tip {
  margin-top: 16px;
  padding: 10px 14px;
  font-size: 12px;
  color: #64748b;
  border-top: 1px solid #334155;
  line-height: 1.6;
}
.admin-main {
  flex: 1 1 auto;
  margin-left: 220px;
  min-width: 0;
  padding: 20px 28px 40px;
}

@media (max-width: 780px) {
  .admin-layout { flex-direction: column; gap: 0; }
  .admin-sidebar {
    position: sticky;
    top: var(--topbar-h);      /* 小屏时也在 topbar 下方吸顶 */
    left: 0;
    right: 0;
    bottom: auto;
    width: 100%;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    padding: 10px 12px;
    border-right: none;
    border-bottom: 1px solid #334155;
    z-index: 10;
  }
  .admin-sidebar .sidebar-item { padding: 8px 12px; font-size: 13px; }
  .sidebar-title { display: none; }
  .sidebar-tip { display: none; }
  .admin-main { margin-left: 0; padding: 16px; }
  body.is-admin-view .topbar { padding-left: 16px; }
}

.panel {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid #334155;
  border-radius: 14px;
  padding: 22px 26px;
  margin-bottom: 22px;
  backdrop-filter: blur(6px);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

.panel h2 {
  margin: 0 0 16px;
  font-size: 17px;
  color: #f1f5f9;
  border-left: 4px solid #38bdf8;
  padding-left: 10px;
}

.panel h3 {
  margin: 0 0 12px;
  font-size: 15px;
  color: #cbd5e1;
  font-weight: 500;
}

.panel-inner {
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(51, 65, 85, 0.55);
  border-radius: 10px;
  padding: 18px 20px;
  margin-bottom: 16px;
}

/* ===== 全局设置：sub-tab ===== */
.sub-tabs {
  display: flex;
  gap: 6px;
  margin: 0 0 22px 0;
  border-bottom: 2px solid #334155;
  padding-bottom: 0;
  flex-wrap: wrap;
}
.sub-tab-item {
  padding: 10px 20px;
  background: transparent;
  color: #94a3b8;
  border: 1px solid transparent;
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.18s;
  margin-bottom: -2px;
}
.sub-tab-item:hover {
  color: #e2e8f0;
  background: rgba(56, 189, 248, 0.08);
}
.sub-tab-item.active {
  background: rgba(30, 41, 59, 0.85);
  color: #38bdf8;
  border: 2px solid #334155;
  border-bottom-color: transparent;
  font-weight: 500;
}

.sub-panel {
  display: none;
}
.sub-panel.active {
  display: block;
  animation: fadeIn 0.2s ease-in;
}

/* ===== 可搜索下拉（模糊搜索 + 选择） ===== */
.searchable {
  position: relative;
  display: inline-block;
  width: 100%;
}
.searchable-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #334155;
  border-radius: 8px;
  background: #0f172a;
  color: #e2e8f0;
  font-size: 14px;
  cursor: text;
  box-sizing: border-box;
}
.searchable-input:focus {
  outline: none;
  border-color: #38bdf8;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.25);
}
.searchable-input.has-value { color: #e2e8f0; }
.searchable-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  line-height: 18px;
  text-align: center;
  background: rgba(148, 163, 184, 0.2);
  border-radius: 50%;
  color: #cbd5e1;
  cursor: pointer;
  font-size: 14px;
  user-select: none;
  display: none;
}
.searchable-clear:hover { background: rgba(148, 163, 184, 0.4); }
.searchable-clear.show { display: block; }
.searchable-list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 8px;
  max-height: 260px;
  overflow-y: auto;
  z-index: 100;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  display: none;
}
.searchable-list.show { display: block; }
.searchable-item {
  padding: 8px 12px;
  cursor: pointer;
  color: #cbd5e1;
  font-size: 14px;
  transition: background 0.1s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.searchable-item:hover {
  background: rgba(56, 189, 248, 0.18);
  color: #f1f5f9;
}
.searchable-item.selected {
  background: rgba(56, 189, 248, 0.22);
  color: #38bdf8;
  font-weight: 500;
}
.searchable-empty {
  padding: 12px;
  text-align: center;
  color: #64748b;
  font-size: 13px;
  font-style: italic;
}
.searchable-hint {
  color: #64748b;
  font-size: 11px;
  margin-top: 4px;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 14px;
}

.grid-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; color: #94a3b8; }
.field input, .field select {
  padding: 10px 12px;
  background: #0f172a;
  color: #e2e8f0;
  border: 1px solid #334155;
  border-radius: 8px;
  font-size: 14px;
}
.field input:focus, .field select:focus {
  outline: none;
  border-color: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}
.hidden { display: none !important; }

.form-actions { grid-column: 1 / -1; display: flex; gap: 10px; }

.btn {
  padding: 10px 18px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  transition: all .15s;
}
.btn.primary {
  background: linear-gradient(135deg, #0ea5e9, #6366f1);
  color: #fff;
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}
.btn.primary:hover { transform: translateY(-1px); }
.btn.danger { background: #dc2626; color: #fff; }
.btn.danger:hover { background: #b91c1c; }
.btn.ghost {
  background: transparent;
  border: 1px solid #334155;
  color: #cbd5e1;
}
.btn.ghost:hover { background: #334155; color: #f1f5f9; }
.btn.small { padding: 6px 12px; font-size: 13px; }

.inline-form { display: flex; gap: 8px; flex-wrap: wrap; }
.inline-form input, .inline-form select {
  padding: 8px 10px;
  background: #0f172a;
  color: #e2e8f0;
  border: 1px solid #334155;
  border-radius: 6px;
  font-size: 13px;
}

.table-wrap { overflow-x: auto; }
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  table-layout: auto;
}
.data-table th, .data-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid #334155;
  white-space: nowrap;
}
.data-table th {
  background: rgba(15, 23, 42, 0.9);
  color: #94a3b8;
  font-weight: 500;
  font-size: 13px;
}
.data-table tbody tr:hover {
  background: rgba(56, 189, 248, 0.08);
}

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
}
.badge.online { background: rgba(34, 197, 94, 0.2); color: #4ade80; }
.badge.offline { background: rgba(100, 116, 139, 0.2); color: #94a3b8; }
.badge.pending { background: rgba(234, 179, 8, 0.2); color: #facc15; }
.badge.accepted { background: rgba(34, 197, 94, 0.2); color: #4ade80; }
.badge.cancelled { background: rgba(100, 116, 139, 0.2); color: #94a3b8; }
.badge.player { background: rgba(99, 102, 241, 0.2); color: #a5b4fc; }
.badge.partner { background: rgba(236, 72, 153, 0.2); color: #f9a8d4; }
.badge.success { background: rgba(34, 197, 94, 0.2); color: #4ade80; }
.badge.warning { background: rgba(234, 179, 8, 0.2); color: #facc15; }
.badge.danger { background: rgba(239, 68, 68, 0.2); color: #f87171; }
.badge.enabled { background: rgba(34, 197, 94, 0.2); color: #4ade80; }
.badge.disabled { background: rgba(239, 68, 68, 0.2); color: #f87171; }

.timer {
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
}
.timer-normal {
  background-color: #22c55e;
  color: #000;
}
.timer-timeout {
  background-color: #fbbf24;
  color: #dc2626;
}
.timer-wait {
  background-color: #3b82f6;
  color: #fff;
}

.player-switch {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.player-switch select {
  padding: 8px 12px;
  background: #0f172a;
  color: #e2e8f0;
  border: 1px solid #334155;
  border-radius: 8px;
}
.player-status { font-size: 14px; color: #94a3b8; }
.player-actions { display: flex; gap: 10px; margin-bottom: 10px; }
.hint { font-size: 13px; color: #94a3b8; margin: 6px 0 0; }
.hint b { color: #38bdf8; }

/* ============================================================
 * 统计卡片
 * ============================================================ */
.stat-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 16px;
}
.stat-card {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.stat-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  flex-shrink: 0;
}
.stat-content {
  flex: 1;
  min-width: 0;
}
.stat-label {
  font-size: 13px;
  color: #94a3b8;
  margin-bottom: 4px;
}
.stat-value {
  font-size: 24px;
  font-weight: 600;
  color: #f1f5f9;
  margin-bottom: 2px;
}
.stat-sub {
  font-size: 12px;
  color: #64748b;
}

/* ============================================================
 * 弹窗（派单、配置等）
 * ============================================================ */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.modal-box {
  width: 480px;
  max-width: calc(100vw - 40px);
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  overflow: hidden;
}
.modal-header {
  padding: 16px 20px;
  font-weight: 600;
  font-size: 16px;
  border-bottom: 1px solid #334155;
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.8);
}
.modal-body {
  padding: 20px;
}
.modal-footer {
  padding: 14px 20px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  border-top: 1px solid #334155;
  background: rgba(15, 23, 42, 0.55);
}
.modal-body .field label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  color: #cbd5e1;
}
.modal-body .field select,
.modal-body .field input {
  width: 100%;
  background: #0f172a;
  color: #e2e8f0;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 14px;
}

/* ============================================================
 * 收款/付款弹窗样式
 * ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.modal-overlay .modal {
  width: 480px;
  max-width: calc(100vw - 40px);
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  overflow: hidden;
}
.modal-overlay .modal-header {
  padding: 16px 20px;
  font-weight: 600;
  font-size: 16px;
  border-bottom: 1px solid #334155;
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.8);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-overlay .modal-header .modal-close {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}
.modal-overlay .modal-header .modal-close:hover {
  color: #f1f5f9;
}
.modal-overlay .modal-body {
  padding: 20px;
}
.modal-overlay .modal-footer {
  padding: 14px 20px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  border-top: 1px solid #334155;
  background: rgba(15, 23, 42, 0.55);
}

.stat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}
.stat-card {
  padding: 18px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid #334155;
  border-radius: 10px;
}
.stat-card .label { font-size: 13px; color: #94a3b8; }
.stat-card .value { font-size: 22px; color: #38bdf8; margin-top: 6px; font-weight: 600; }

.toast {
  position: fixed;
  top: 80px;
  right: 24px;
  padding: 12px 20px;
  background: rgba(15, 23, 42, 0.95);
  color: #f1f5f9;
  border: 1px solid #334155;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
  transition: all .25s;
  z-index: 100;
  font-size: 14px;
  border-left: 4px solid #38bdf8;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.error { border-left-color: #f87171; }
.toast.success { border-left-color: #4ade80; }

.login-panel {
  max-width: 520px;
  margin: 60px auto 0;
  padding: 32px;
}
.login-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 16px;
}
.login-form .btn.primary {
  margin-top: 6px;
  padding: 12px 20px;
  font-size: 15px;
}
.login-tips {
  background: rgba(15, 23, 42, 0.6);
  border: 1px dashed #334155;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 13px;
  color: #94a3b8;
  line-height: 1.8;
}
.login-tips code {
  background: #1e293b;
  color: #38bdf8;
  padding: 2px 8px;
  border-radius: 4px;
  font-family: monospace;
}

.player-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  padding: 16px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid #334155;
  border-radius: 10px;
  margin-bottom: 14px;
}
.player-info > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.label-sm {
  font-size: 12px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.who-name {
  font-size: 15px;
  color: #f1f5f9;
  font-weight: 500;
}

/* ==== 对账中心样式 ==== */
.rec-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  border-bottom: 1px solid #334155;
  padding-bottom: 14px;
}
.rec-panel { display: none; }
.rec-panel.active { display: block; }
.rec-detail { margin-top: 16px; padding-top: 16px; border-top: 1px dashed #334155; }
.rec-detail .data-table { font-size: 13px; }
.rec-detail .data-table th,
.rec-detail .data-table td {
  padding: 8px 10px;
}

/* 对账表格合计行 */
.data-table tfoot .rec-total td,
.data-table tfoot .rec-total {
  background: rgba(56, 189, 248, 0.08);
  color: #e2e8f0;
  font-weight: 600;
  border-top: 2px solid #38bdf8;
}

@media (max-width: 720px) {
  .topbar { flex-direction: column; gap: 14px; align-items: stretch; }
  .user-session { justify-content: space-between; }
  .container { padding: 20px 16px; }
  .login-panel { margin-top: 30px; padding: 24px; }
  .login-panel h1 { font-size: 22px; }
}

/* ============================================================
 * 可搜索下拉选择器
 * ============================================================ */
.search-select {
  position: relative;
}

.search-select .search-input {
  border: 1px solid #374151;
  border-radius: 6px;
  background: #1e293b;
  color: #e2e8f0;
  outline: none;
  transition: border-color 0.2s;
}

.search-select .search-input:focus {
  border-color: #3b82f6;
}

.search-select .search-options {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 200px;
  overflow-y: auto;
  background: #1e293b;
  border: 1px solid #374151;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 100;
}

.search-select .search-option {
  padding: 8px 12px;
  cursor: pointer;
  transition: background-color 0.2s;
  color: #e2e8f0;
}

.search-select .search-option:hover {
  background-color: #334155;
}

.search-select .search-placeholder {
  cursor: pointer;
}

.search-select .search-placeholder:hover {
  border-color: #475569;
}

/* ===== 打手端对账中心搜索面板样式 ===== */
.search-panel {
  background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.search-row {
  display: flex;
  gap: 20px;
  align-items: flex-end;
  margin-bottom: 16px;
}

.search-row:last-child {
  margin-bottom: 0;
}

.search-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 140px;
}

.search-group label {
  font-size: 13px;
  color: #94a3b8;
  font-weight: 500;
}

.search-group .form-input,
.search-group .form-select {
  width: 160px;
  min-width: 140px;
}

.search-group.date-group {
  flex: 1;
  min-width: 300px;
}

.search-group.date-group .date-range {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-group.date-group .form-input {
  width: 140px;
}

.date-separator {
  color: #64748b;
  font-size: 14px;
}

.search-group.quick-btns {
  flex: 1;
}

.search-group.quick-btns .quick-btn-group {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.search-group.quick-btns .btn {
  flex-shrink: 0;
}

.search-actions {
  display: flex;
  align-items: flex-end;
}

.search-actions .btn {
  height: 36px;
}

/* 响应式调整 */
@media (max-width: 900px) {
  .search-row {
    flex-wrap: wrap;
  }
  
  .search-group {
    flex: 1;
    min-width: calc(50% - 10px);
  }
  
  .search-group .form-input,
  .search-group .form-select {
    width: 100%;
  }
  
  .search-group.date-group {
    min-width: 100%;
  }
  
  .search-group.date-group .date-range {
    flex-wrap: wrap;
  }
  
  .search-group.date-group .form-input {
    width: calc(50% - 12px);
  }
}

/* ===== 付款单详情弹窗样式 ===== */
.payment-detail-modal {
  min-width: 980px;
  max-width: 1200px;
  border-radius: 16px;
  overflow: hidden;
}

.payment-detail-modal .modal-header {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  padding: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #334155;
}

.payment-detail-modal .modal-close {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: color 0.2s;
}

.payment-detail-modal .modal-close:hover {
  color: #f1f5f9;
}

.payment-detail-modal .header-content {
  display: flex;
  align-items: center;
  gap: 16px;
}

.payment-detail-modal .icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: 0 4px 12px rgba(251, 191, 36, 0.3);
}

.payment-detail-modal h3 {
  margin: 0;
  font-size: 18px;
  color: #f1f5f9;
}

.payment-detail-modal .sub-title {
  font-size: 13px;
  color: #94a3b8;
  margin-top: 4px;
}

.payment-detail-modal .modal-body {
  padding: 24px;
  background: #0f172a;
}

/* 信息卡片 */
.payment-detail-modal .info-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.payment-detail-modal .info-card {
  background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 16px;
  text-align: center;
}

.payment-detail-modal .info-card.highlight {
  background: linear-gradient(145deg, #292524 0%, #1c1917 100%);
  border-color: #78716c;
}

.payment-detail-modal .info-label {
  font-size: 12px;
  color: #94a3b8;
  margin-bottom: 8px;
}

.payment-detail-modal .info-value {
  font-size: 14px;
  color: #f1f5f9;
}

.payment-detail-modal .info-value.money {
  font-size: 24px;
  font-weight: bold;
  color: #4ade80;
}

/* 详细信息 */
.payment-detail-modal .detail-section {
  background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 24px;
}

.payment-detail-modal .detail-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid #334155;
}

.payment-detail-modal .detail-row:last-child {
  border-bottom: none;
}

.payment-detail-modal .detail-row label {
  font-size: 13px;
  color: #94a3b8;
  font-weight: 500;
}

.payment-detail-modal .detail-row span {
  font-size: 13px;
  color: #e2e8f0;
}

/* 订单列表 */
.payment-detail-modal .order-section {
  background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
  border: 1px solid #334155;
  border-radius: 12px;
  overflow: hidden;
}

.payment-detail-modal .section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #334155;
  background: rgba(30, 41, 59, 0.5);
}

.payment-detail-modal .section-header h4 {
  margin: 0;
  font-size: 14px;
  color: #f1f5f9;
}

.payment-detail-modal .order-count {
  font-size: 12px;
  color: #64748b;
  background: #334155;
  padding: 4px 12px;
  border-radius: 20px;
}

.payment-detail-modal .order-list {
  padding: 8px;
  max-height: 300px;
  overflow-y: auto;
}

/* 订单列表滚动条样式 */
.payment-detail-modal .order-list::-webkit-scrollbar {
  width: 6px;
}

.payment-detail-modal .order-list::-webkit-scrollbar-track {
  background: #1e293b;
  border-radius: 3px;
}

.payment-detail-modal .order-list::-webkit-scrollbar-thumb {
  background: #475569;
  border-radius: 3px;
}

.payment-detail-modal .order-list::-webkit-scrollbar-thumb:hover {
  background: #64748b;
}

.payment-detail-modal .order-item {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  border-radius: 6px;
  margin-bottom: 2px;
  transition: background 0.2s;
  gap: 16px;
}

.payment-detail-modal .order-item:hover {
  background: rgba(59, 130, 246, 0.1);
}

.payment-detail-modal .order-no {
  flex: 1;
  min-width: 120px;
  font-size: 13px;
  color: #60a5fa;
  font-weight: 500;
}

.payment-detail-modal .order-no a {
  color: #60a5fa;
  text-decoration: none;
}

.payment-detail-modal .order-no a:hover {
  text-decoration: underline;
}

.payment-detail-modal .order-meta {
  width: 80px;
  font-size: 13px;
  color: #94a3b8;
}

.payment-detail-modal .order-duration {
  width: 60px;
  font-size: 13px;
  color: #94a3b8;
}

.payment-detail-modal .order-time {
  width: 140px;
  font-size: 13px;
  color: #64748b;
}

.payment-detail-modal .order-amount {
  width: 90px;
  text-align: right;
  font-size: 13px;
  font-weight: 600;
  color: #4ade80;
}

/* 按钮样式优化 */
.payment-detail-modal .modal-footer {
  padding: 16px 24px;
  background: #1e293b;
  border-top: 1px solid #334155;
  display: flex;
  justify-content: flex-end;
}

.payment-detail-modal .btn.primary {
  padding: 10px 32px;
  font-size: 14px;
  font-weight: 500;
}

/* ===== 分页控件样式 ===== */
.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  margin-top: 8px;
}

.pagination-info {
  font-size: 13px;
  color: #94a3b8;
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pagination-controls .btn {
  min-width: 70px;
}

.pagination-controls .btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination-numbers {
  display: flex;
  gap: 4px;
  align-items: center;
}

.pagination-number {
  min-width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  color: #94a3b8;
}

.pagination-number:hover {
  background: #334155;
  color: #f1f5f9;
}

.pagination-number.active {
  background: #3b82f6;
  color: #fff;
  font-weight: 600;
}

.pagination-ellipsis {
  color: #64748b;
  padding: 0 4px;
}