/**
 * YFT merchant console theme
 */
:root {
  --yft-side: #102820;
  --yft-side-hover: rgba(255, 255, 255, 0.08);
  --yft-side-active: #5eead4;
  --yft-side-active-bg: rgba(45, 212, 191, 0.18);
  --yft-side-text: #e8f0ee;
  --yft-side-muted: #9db5af;
  --yft-canvas: #f4f6f8;
  --yft-surface: #ffffff;
  --yft-border: #e8edf3;
  --yft-border-strong: #d5dee8;
  --yft-text: #0f172a;
  --yft-muted: #64748b;
  --yft-accent: #0f766e;
  --yft-radius: 10px;
  --yft-radius-sm: 8px;
  --yft-font: "Segoe UI", "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --pu-accent: #0f766e;
  --pu-accent-soft: #ccfbf1;
  --pu-text: #0f172a;
  --pu-muted: #64748b;
  --pu-border: #e8edf3;
  --pu-radius: 8px;
  --pu-shadow: none;
}

html,
body.jeepay-merchant,
body.yft-merchant {
  font-family: var(--yft-font) !important;
  background: var(--yft-canvas) !important;
  color: var(--yft-text);
  -webkit-font-smoothing: antialiased;
}

body.yft-merchant::before,
body.jeepay-merchant::before {
  display: none !important;
}

body.jeepay-merchant .app,
.jeepay-app,
body.yft-merchant .app {
  background: transparent !important;
}

/* Sidebar 深色底（高对比文字） */
body.jeepay-merchant .mu-sidebar,
body.jeepay-merchant .app-aside,
body.yft-merchant .mu-sidebar {
  width: 232px !important;
  max-width: 232px !important;
  background: linear-gradient(180deg, #16352c 0%, #102820 42%, #0c1f19 100%) !important;
  border-right: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.18) !important;
  color: #e8f0ee !important;
}

.mu-sidebar-brand {
  height: 64px !important;
  padding: 0 16px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
  background: transparent !important;
}

.mu-brand-name {
  color: #f8fafc !important;
  font-weight: 600 !important;
  font-size: 15px !important;
  letter-spacing: 0 !important;
}

.mu-brand-sub {
  color: #9db5af !important;
  font-size: 12px !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  margin-top: 2px;
}

.mu-brand-logo {
  width: 32px !important;
  height: 32px !important;
  border-radius: 8px !important;
  padding: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: hidden;
}

.sidebar-collapse-btn {
  color: #9db5af !important;
  width: 34px !important;
  height: 34px !important;
  border-radius: 6px !important;
}

.sidebar-collapse-btn:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #fff !important;
}

.navi-wrap {
  padding: 8px 0 12px !important;
}

body.jeepay-merchant .navi .nav > li.nav-section,
body.yft-merchant .navi .nav > li.nav-section {
  float: none !important;
  display: block !important;
  width: auto !important;
  color: #9db5af !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  letter-spacing: 0.08em !important;
  text-transform: none !important;
  text-align: left !important;
  padding: 18px 14px 8px 26px !important;
  margin: 0 !important;
  background: transparent !important;
  border: none !important;
  line-height: 1.2 !important;
}

body.jeepay-merchant .navi .nav > li,
body.yft-merchant .navi .nav > li {
  float: none !important;
  display: block !important;
  width: auto !important;
}

body.jeepay-merchant .navi .nav > li > a,
body.yft-merchant .navi .nav > li > a {
  color: #dce8e4 !important;
  margin: 2px 10px !important;
  border-radius: 10px !important;
  height: 44px !important;
  display: flex !important;
  align-items: center !important;
  padding: 0 12px !important;
  line-height: 1.2 !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  box-shadow: none !important;
  background: transparent !important;
  text-align: left !important;
}

body.jeepay-merchant .navi .nav > li > a > span,
body.yft-merchant .navi .nav > li > a > span {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.jeepay-merchant .navi .nav > li > a i,
body.yft-merchant .navi .nav > li > a i {
  width: 28px !important;
  height: 28px !important;
  margin-right: 10px !important;
  text-align: center;
  color: #c5ddd6 !important;
  line-height: 28px !important;
  font-size: 13px !important;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s, color 0.2s;
}

body.jeepay-merchant .navi .nav > li > a:hover,
body.yft-merchant .navi .nav > li > a:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #fff !important;
  box-shadow: none !important;
}

body.jeepay-merchant .navi .nav > li.active > a,
body.yft-merchant .navi .nav > li.active > a {
  background: rgba(45, 212, 191, 0.18) !important;
  color: #5eead4 !important;
  font-weight: 500 !important;
  box-shadow: none !important;
}

body.jeepay-merchant .navi .nav > li > a:hover i,
body.jeepay-merchant .navi .nav > li.active > a i,
body.yft-merchant .navi .nav > li.active > a i,
body.yft-merchant .navi .nav > li > a:hover i {
  color: #5eead4 !important;
  background: rgba(45, 212, 191, 0.2);
}

.nav-badge,
body.jeepay-merchant .navi .badge {
  background: #ff4d4f !important;
  box-shadow: none !important;
}

.mu-sidebar-foot {
  min-height: 56px !important;
  padding: 12px 16px !important;
  border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
  background: rgba(0, 0, 0, 0.18) !important;
  color: #dce8e4 !important;
}

.mu-sidebar-logout:hover {
  color: #fff !important;
  background: rgba(255, 255, 255, 0.08) !important;
}

.mu-menu-toggle {
  background: #fff !important;
  color: #262626 !important;
  border: 1px solid #d9d9d9 !important;
  box-shadow: none !important;
}

body.mu-sidebar-collapsed .mu-main,
body.jeepay-merchant.mu-sidebar-collapsed .mu-main {
  margin-left: 72px !important;
}
body.jeepay-merchant .mu-main,
body.yft-merchant .mu-main {
  margin-left: 232px !important;
}

.mu-main,
.app-content,
.app-content-body {
  background: transparent !important;
  position: relative;
  z-index: 1;
}

.app-content {
  padding: 16px 20px 28px !important;
}

/* Cards */
.mu-page-card,
.app-content .panel,
.mu-table-panel,
.mu-chart-panel,
.mu-stat-card {
  background: var(--yft-surface) !important;
  border: 1px solid var(--yft-border) !important;
  border-radius: var(--yft-radius) !important;
  box-shadow: none !important;
  overflow: hidden;
}

.mu-page-head {
  padding: 14px 16px 12px;
  background: #fff;
  border-bottom: 1px solid var(--yft-border);
}

.mu-page-head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--yft-text);
  letter-spacing: 0;
}

.mu-page-head h3::after {
  display: none !important;
}

.app-content .panel-heading {
  background: #fafafa !important;
  border-bottom: 1px solid var(--yft-border) !important;
  font-weight: 600 !important;
}

.mu-dash-hero {
  margin: 0 0 14px;
  padding: 0 0 12px;
  border-bottom: 1px solid var(--yft-border);
  text-align: left !important;
}

.mu-dash-hero h1 {
  margin: 0 !important;
  font-size: 18px !important;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
}

.mu-dash-hero p {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--yft-muted);
}

.mu-stat-card {
  position: relative;
  padding: 18px 16px;
}

.mu-stat-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--yft-accent);
}

.mu-stat-card:hover {
  transform: none !important;
  box-shadow: none !important;
  border-color: var(--yft-border-strong) !important;
}

.mu-stat-card .val {
  font-variant-numeric: tabular-nums;
}

.mu-stat-card .val.amount {
  color: var(--yft-accent) !important;
}

.mu-stat-card .val.amount-fee {
  color: #0e7490 !important;
}

/* Filters — 横向一行 */
.app-content .admin-filter-compact.admin-filter-form,
.app-content .mu-pc-filter {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 10px 12px !important;
  padding: 12px 16px !important;
  background: #fff !important;
  border-bottom: 1px solid var(--yft-border) !important;
  width: 100%;
  box-sizing: border-box;
}

.app-content .admin-filter-compact .admin-filter-grid {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 10px 14px !important;
  flex: 1 1 auto;
  width: auto !important;
}

.app-content .admin-filter-compact .admin-filter-item {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 8px !important;
  min-width: 0 !important;
  width: auto !important;
  max-width: none !important;
  margin: 0 !important;
}

.app-content .admin-filter-compact .admin-filter-item label {
  display: inline-block !important;
  margin: 0 !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  color: var(--yft-muted) !important;
  white-space: nowrap !important;
}

.app-content .admin-filter-compact .admin-filter-item .form-control {
  height: 34px !important;
  border-radius: var(--yft-radius-sm) !important;
  border: 1px solid var(--yft-border-strong) !important;
  box-shadow: none !important;
  font-size: 13px !important;
  padding: 4px 10px !important;
  width: auto !important;
  min-width: 120px !important;
  max-width: 220px !important;
}

.app-content .form-control {
  height: 34px !important;
  border-radius: var(--yft-radius-sm) !important;
  border: 1px solid var(--yft-border-strong) !important;
  box-shadow: none !important;
  font-size: 13px !important;
  padding: 4px 10px !important;
}

.app-content .admin-filter-compact .admin-filter-item .form-control:focus,
.app-content .form-control:focus {
  border-color: var(--yft-accent) !important;
  box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.12) !important;
}

.app-content .admin-filter-compact .admin-filter-item.admin-filter-span-2 {
  flex: 1 1 260px !important;
  min-width: 220px !important;
  max-width: 420px !important;
}

.app-content .admin-filter-compact .admin-filter-item.admin-filter-span-2 .form-control {
  max-width: none !important;
  width: 100% !important;
  min-width: 0 !important;
}

.app-content .admin-filter-actions {
  display: inline-flex !important;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 !important;
  align-items: center;
}

/* Buttons */
.app-content .btn,
body.premium-user-login .btn,
body.premium-user-login .auth-submit {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px;
  height: auto !important;
  min-height: 34px;
  padding: 6px 14px !important;
  line-height: 1.2 !important;
  border-radius: var(--yft-radius-sm) !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  box-shadow: none !important;
  box-sizing: border-box;
}

.app-content .btn > i { line-height: 1 !important; margin: 0 !important; }
.app-content .btn-sm { min-height: 30px; padding: 4px 10px !important; font-size: 12px !important; }
.app-content .btn-xs { min-height: 24px; padding: 2px 8px !important; font-size: 12px !important; }

.app-content .btn-primary,
body.premium-user-login .auth-submit {
  background: var(--yft-accent) !important;
  border-color: var(--yft-accent) !important;
  color: #fff !important;
}

.app-content .btn-primary:hover {
  background: #0d9488 !important;
  border-color: #0d9488 !important;
}

.app-content .btn-group {
  display: inline-flex !important;
  align-items: stretch;
}

.app-content .btn-group > .btn { float: none !important; }

.mu-table-panel .table > thead > tr > th {
  background: #fafafa !important;
  border-bottom: 1px solid var(--yft-border) !important;
  color: #374151 !important;
  font-weight: 600 !important;
  font-size: 13px !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

.mu-table-panel .table > tbody > tr:hover {
  background: #f8fafc !important;
}

.app-content .pagination > li > a,
.app-content .pagination > li > span {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 32px;
  height: 32px;
  padding: 0 8px !important;
  line-height: 1 !important;
}

.layui-layer-btn a {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 32px !important;
  line-height: 1 !important;
  padding: 0 14px !important;
  border-radius: 6px !important;
}

/* Login */
body.premium-user-login {
  background: #0f172a !important;
}

body.premium-user-login .auth-card {
  background: #fff !important;
  border-radius: 12px !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28) !important;
  border: 1px solid #e5e7eb !important;
}

body.premium-user-login .auth-logo {
  width: 72px !important;
  height: 72px !important;
  border-radius: 50% !important;
  padding: 0 !important;
  background: transparent !important;
  overflow: hidden;
  box-shadow: none !important;
}

body.premium-user-login .auth-logo .brand-logo-img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

body.premium-user-login .auth-submit {
  min-height: 42px !important;
}

/* 鍔熻兘椤甸《鏍忥細杩斿洖 + 鏍囬 */
.yft-page-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  min-height: 36px;
}
.yft-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px 6px 8px;
  border: 1px solid #dbe3ee;
  border-radius: 8px;
  background: #fff;
  color: #334155;
  font-size: 13px;
  line-height: 1;
  text-decoration: none !important;
  white-space: nowrap;
  flex-shrink: 0;
}
.yft-back-btn:hover,
.yft-back-btn:focus {
  border-color: #0f766e;
  color: #0f766e;
}
.yft-back-btn .fa {
  font-size: 16px;
  line-height: 1;
}
.yft-page-title {
  margin: 0;
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: #0f172a;
  line-height: 1.25;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 991px) {
  .app-content { padding: 12px !important; }
  .yft-page-title { font-size: 16px; }
}

@media (max-width: 560px) {
  .app-content .admin-filter-compact .admin-filter-item {
    flex: 1 1 100% !important;
  }
  .app-content .admin-filter-compact .admin-filter-item .form-control,
  .app-content .admin-filter-compact .admin-filter-item.admin-filter-span-2 {
    max-width: none !important;
    width: 100% !important;
    min-width: 0 !important;
  }
}
