/* 用户前台 - 晓风授权站 xiaochu.ljwx.site 模板 */
.us-console-layout {
  display: flex;
  min-height: 100vh;
  background: #f0f2f5;
}

.us-sidebar {
  width: 220px;
  flex-shrink: 0;
  background: #304156;
  color: #d1d5db;
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 100;
}

.us-sidebar-logo {
  padding: 18px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.us-sidebar-logo .logo-text {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  line-height: 1.4;
}
.us-sidebar-logo small {
  display: block;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.45);
  font-weight: normal;
  margin-top: 4px;
}

.us-sidebar-nav {
  flex: 1;
  padding: 12px 0;
  overflow-y: auto;
}

.us-sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  color: #d1d5db;
  text-decoration: none;
  font-size: 14px;
  transition: all 0.15s ease;
}

.us-sidebar-nav a:hover,
.us-sidebar-nav a.active {
  background: #263445;
  color: #fff;
}

.us-sidebar-nav a.active {
  color: #409eff;
  border-right: 3px solid #409eff;
}

.us-sidebar-footer {
  padding: 16px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.us-sidebar-footer .us-user-email {
  font-size: 12px;
  color: #9ca3af;
  margin-bottom: 10px;
  word-break: break-all;
}

.us-sidebar-footer button {
  width: 100%;
  padding: 8px 12px;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.08);
  color: #e5e7eb;
  transition: background 0.15s;
}

.us-sidebar-footer button:hover {
  background: rgba(255, 255, 255, 0.14);
}

.us-sidebar-footer .us-login-link {
  display: block;
  text-align: center;
  padding: 8px 12px;
  border-radius: 6px;
  background: #4f46e5;
  color: #fff;
  text-decoration: none;
  font-size: 13px;
}

.us-sidebar-footer .us-login-link:hover {
  background: #4338ca;
  color: #fff;
}

.us-main {
  flex: 1;
  margin-left: 220px;
  min-height: 100vh;
}

.console-wrapper {
  background: #f5f6f8;
  min-height: 100vh;
  padding: 1.5rem;
}

.stat-cards {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.stat-card {
  background: #fff;
  border: 1px solid #e8eaed;
  border-radius: 10px;
  padding: 1rem 1.25rem;
  min-width: 180px;
  flex: 1;
  max-width: 320px;
}

.stat-label {
  font-size: 0.75rem;
  color: #8c9199;
  margin-bottom: 0.375rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.stat-value {
  font-size: 1.375rem;
  font-weight: 700;
  color: #1a1d21;
  letter-spacing: -0.02em;
}

.stat-value .currency {
  color: #dc2626;
}

.stat-actions {
  display: flex;
  gap: 0.375rem;
  margin-top: 0.625rem;
}

.stat-actions .btn-recharge,
.stat-actions .btn-withdraw {
  border: none;
  padding: 6px 14px;
  border-radius: 4px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
}

.stat-actions .btn-recharge {
  background: #409eff;
  color: #fff;
}

.stat-actions .btn-recharge:hover {
  background: #66b1ff;
}

.stat-actions .btn-withdraw {
  background: #fff;
  color: #409eff;
  border: 1px solid #409eff;
}

.stat-actions .btn-withdraw:hover {
  background: #ecf5ff;
}

.field-input-editable {
  flex: 1;
  border: 1px solid #dcdfe6;
  border-radius: 4px;
  padding: 8px 12px;
  font-size: 13px;
  max-width: 100%;
}

.field-input-editable.full {
  width: 100%;
  margin-top: 8px;
}

.field-tip {
  font-size: 12px;
  color: #909399;
  margin-left: 8px;
}

.form-actions {
  padding-top: 12px;
  text-align: right;
}

.upload-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.upload-label {
  font-size: 13px;
  color: #606266;
  font-weight: 500;
}

/* 收款码上传 - 晓风授权站风格 */
.pay-info-form {
  padding: 8px 4px 4px;
}

.pay-upload-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.pay-upload-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.pay-upload-label {
  width: 48px;
  flex-shrink: 0;
  padding-top: 28px;
  font-size: 14px;
  color: #303133;
  font-weight: 500;
}

.pay-upload-box {
  position: relative;
  width: 120px;
  height: 120px;
  border: 1px dashed #c0c4cc;
  border-radius: 6px;
  background: #fafafa;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.15s;
}

.pay-upload-box:hover {
  border-color: #409eff;
}

.pay-upload-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 3;
}

.pay-upload-plus {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 28px;
  color: #c0c4cc;
  line-height: 1;
  pointer-events: none;
  z-index: 1;
}

.pay-upload-preview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
  z-index: 2;
}

.pay-upload-box.has-image .pay-upload-preview {
  display: block;
}

.pay-upload-box.has-image .pay-upload-plus {
  display: none;
}

.pay-upload-mask {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 13px;
  z-index: 4;
  pointer-events: none;
}

.pay-upload-box.has-image:hover .pay-upload-mask {
  display: flex;
}

.xf-cards-row .card {
  flex: 1;
  min-width: min(100%, 360px);
}

.data-table.xf-auth-table {
  min-width: 960px;
}

.xf-auth-table .auth-field-cell {
  min-width: 180px;
}

.xf-auth-table .auth-field-input {
  width: 100%;
  min-width: 140px;
  max-width: 220px;
  padding: 6px 10px;
  border: 1px solid #dcdfe6;
  border-radius: 4px;
  font-size: 13px;
  box-sizing: border-box;
}

.xf-auth-table .auth-field-input:focus {
  border-color: #409eff;
  outline: none;
}

.xf-auth-table .auth-field-input:disabled {
  background: #f5f7fa;
  color: #909399;
}

.xf-auth-table .auth-op-cell {
  white-space: nowrap;
}

.xf-auth-table .btn-modify-auth {
  margin-left: 6px;
  padding: 5px 14px;
  font-size: 12px;
  border: none;
  border-radius: 4px;
  background: #1f2d3d;
  color: #fff;
  cursor: pointer;
  vertical-align: middle;
}

.xf-auth-table .btn-modify-auth:hover {
  background: #304156;
}

.xf-auth-table .btn-modify-auth:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.page-size-hint {
  font-size: 12px;
  color: #909399;
  margin-left: 8px;
}

.wd-balance-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 20px;
  font-size: 14px;
}

.wd-balance-row strong {
  color: #303133;
}

.btn-primary-console,
.btn-renew {
  background: #409eff;
}

.btn-primary-console:hover,
.btn-renew:hover {
  background: #66b1ff;
}

.cards-row {
  display: flex;
  gap: 1.25rem;
  max-width: 1200px;
  margin: 0 auto 1.25rem;
  flex-wrap: wrap;
}

.cards-row .card {
  background: #fff;
  border: 1px solid #e8eaed;
  border-radius: 10px;
  flex: 1;
  min-width: 280px;
  overflow: hidden;
}

.card-header {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid #f0f1f3;
  background: #fafbfc;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-header h3 {
  font-weight: 600;
  color: #2d3748;
  font-size: 1rem;
  margin: 0;
}

.card-body {
  padding: 1.25rem;
}

.user-form .form-field {
  display: flex;
  align-items: center;
  border-bottom: 1px solid #f0f1f3;
  padding: 0.875rem 0;
  gap: 1rem;
}

.user-form .form-field:last-child {
  border-bottom: none;
}

.field-label {
  font-size: 0.8125rem;
  color: #5c5f66;
  font-weight: 500;
  min-width: 72px;
  flex-shrink: 0;
}

.field-input {
  flex: 1;
  font-size: 0.8125rem;
  color: #1a1d21;
}

.field-input.disabled {
  color: #8c9199;
}

.table-section {
  background: #fff;
  border: 1px solid #e8eaed;
  border-radius: 10px;
  overflow: hidden;
  max-width: 1200px;
  margin: 0 auto;
}

.table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.875rem 1rem;
  border-bottom: 1px solid #f0f1f3;
  background: #fafbfc;
}

.table-header h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #2d3748;
  margin: 0;
}

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 1.25rem 1rem;
}

.data-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: 0.8125rem;
}

.data-table th {
  background: #fafbfc;
  padding: 0.5625rem 0.75rem;
  text-align: left;
  font-weight: 600;
  color: #5c5f66;
  border-bottom: 1px solid #e8eaed;
  white-space: nowrap;
  font-size: 0.8125rem;
}

.data-table td {
  padding: 0.6875rem 0.75rem;
  color: #1a1d21;
  border-bottom: 1px solid #f0f1f3;
  vertical-align: middle;
}

.data-table tbody tr:hover td {
  background: #fafbfc;
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.btn-primary-console {
  background: #4f46e5;
  color: #fff;
  border: none;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-primary-console:hover {
  background: #4338ca;
}

.btn-renew {
  background: #4f46e5;
  color: #fff;
  border: none;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
}

.btn-renew:hover {
  background: #4338ca;
}

.status-active {
  color: #059669;
  background: #d1fae5;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

.status-expired {
  color: #dc2626;
  background: #fee2e2;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

.status-disabled {
  color: #6b7280;
  background: #f3f4f6;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 12px;
}

.console-wrapper .no-data {
  text-align: center;
  padding: 48px 20px;
  color: #9ca3af;
  font-size: 14px;
}

.console-wrapper .no-data i {
  font-size: 40px;
  display: block;
  margin-bottom: 12px;
}

.console-wrapper .pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 0.875rem 1rem;
  border-top: 1px solid #f0f1f3;
}

.console-wrapper .pagination button {
  background: #fff;
  border: 1px solid #e0e2e5;
  padding: 6px 14px;
  border-radius: 6px;
  color: #374151;
  cursor: pointer;
  font-size: 13px;
}

.console-wrapper .pagination button:hover:not(:disabled) {
  border-color: #4f46e5;
  color: #4f46e5;
}

.console-wrapper .pagination button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 移动端抽屉：checkbox 控制，不依赖 JS */
.us-nav-check {
  position: fixed;
  left: -9999px;
  top: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  margin: 0;
  padding: 0;
  border: 0;
  appearance: none;
  -webkit-appearance: none;
}

.us-mobile-topbar {
  display: none;
}

.us-menu-toggle {
  display: none;
}

label.us-sidebar-backdrop {
  display: none;
}

@media (max-width: 992px) {
  .us-mobile-topbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: #304156;
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 1200;
    flex-shrink: 0;
  }

  .us-mobile-title {
    font-size: 15px;
    font-weight: 600;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  label.us-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    border: none;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
    position: relative;
    z-index: 1201;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(255, 255, 255, 0.2);
    user-select: none;
    -webkit-user-select: none;
    margin: 0;
  }

  label.us-sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1190;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    pointer-events: none;
    cursor: pointer;
    margin: 0;
  }

  .us-nav-check:checked ~ .us-console-layout .us-sidebar {
    transform: translate3d(0, 0, 0);
    -webkit-transform: translate3d(0, 0, 0);
  }

  .us-nav-check:checked ~ .us-console-layout label.us-sidebar-backdrop {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .us-console-layout .us-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: min(280px, 85vw);
    max-width: 85vw;
    transform: translate3d(-100%, 0, 0);
    -webkit-transform: translate3d(-100%, 0, 0);
    transition: transform 0.25s ease;
    z-index: 1195;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
    will-change: transform;
  }

  .us-sidebar-nav a span,
  .us-sidebar-logo .logo-text,
  .us-sidebar-logo small {
    display: inline;
  }

  .us-main {
    margin-left: 0;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
  }

  .console-wrapper {
    padding: 0.75rem;
  }

  .stat-cards {
    margin-left: 0;
    margin-right: 0;
    max-width: none;
  }

  .stat-card {
    max-width: none;
    min-width: 0;
    width: 100%;
  }

  .stat-actions {
    flex-wrap: wrap;
  }

  .stat-actions button {
    flex: 1;
    min-width: calc(50% - 4px);
  }

  .cards-row,
  .xf-cards-row {
    flex-direction: column;
    margin-left: 0;
    margin-right: 0;
    max-width: none;
  }

  .cards-row .card,
  .xf-cards-row .card {
    min-width: 0;
    width: 100%;
  }

  .user-form .form-field {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }

  .field-label {
    min-width: 0;
  }

  .field-input-editable,
  .field-input-editable.full {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
  }

  .field-tip {
    margin-left: 0;
    margin-top: 4px;
    display: block;
  }

  .upload-grid {
    grid-template-columns: 1fr;
  }

  .table-section {
    max-width: none;
    margin-left: 0;
    margin-right: 0;
    border-radius: 8px;
  }

  .table-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .table-header .btn-primary-console,
  .table-header .btn-buy {
    width: 100%;
    text-align: center;
  }

  .table-scroll,
  .table-scroll-container {
    margin: 0 -0.25rem;
    padding: 0.5rem 0.25rem;
  }

  .data-table,
  .data-table.xf-auth-table {
    min-width: 680px;
    font-size: 12px;
  }

  .data-table th,
  .data-table td {
    padding: 8px 6px;
  }

  .console-wrapper .pagination {
    flex-wrap: wrap;
    font-size: 12px;
    padding: 10px 8px;
  }

  .console-page {
    margin-left: 0;
    margin-right: 0;
    max-width: none;
  }

  .console-page.content,
  .console-page .content {
    padding: 1rem;
  }
}

@media (min-width: 993px) {
  .us-nav-check {
    display: none !important;
  }

  label.us-sidebar-backdrop {
    display: none !important;
  }

  .us-console-layout .us-sidebar {
    transform: none !important;
    -webkit-transform: none !important;
  }
}

@media (max-width: 480px) {
  .console-wrapper {
    padding: 0.5rem;
  }

  .stat-value {
    font-size: 1.15rem;
  }

  .stat-actions button {
    min-width: 100%;
    width: 100%;
  }

  .data-table,
  .data-table.xf-auth-table {
    min-width: 600px;
  }

  .us-sidebar-footer .us-user-email {
    font-size: 11px;
  }
}
