/**
 * GOFINPRO Admin — UI overrides
 * Dashboard compact layout + general polish
 */

:root {
  --admin-primary: #1677ff;
  --admin-primary-hover: #4096ff;
  --admin-success: #52c41a;
  --admin-danger: #ff4d4f;
  --admin-warning: #faad14;
  --admin-bg: #f0f2f5;
  --admin-surface: #ffffff;
  --admin-border: #e8e8e8;
  --admin-text: #1f1f1f;
  --admin-text-muted: #8c8c8c;
  --admin-radius: 10px;
  --admin-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  --admin-sidebar-bg: #0f172a;
  --admin-sidebar-bg-sub: #111827;
  --admin-sidebar-text: rgba(255, 255, 255, 0.72);
  --admin-sidebar-text-active: #ffffff;
  --admin-sidebar-hover: rgba(255, 255, 255, 0.06);
  --admin-sidebar-active-bg: rgba(22, 119, 255, 0.14);
  --admin-sidebar-width: 240px;
}

/* ── Layout ── */
body.full-layout,
body {
  background: var(--admin-bg) !important;
  font-family: Inter, 'Segoe UI', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.gx-app-layout .gx-layout-content {
  padding: 12px 16px 20px !important;
  background: var(--admin-bg) !important;
  position: relative;
  min-height: 200px;
}

.admin-route-overlay {
  position: relative;
  z-index: 50;
  width: 100%;
  min-height: calc(100vh - 120px);
  overflow: visible;
  background: var(--admin-bg, #f5f6f8);
}

/* Hide legacy React — body lock applies before JS can add classes (prevents flash) */
body.admin-lock-game .gx-layout-content > :not(.admin-route-overlay),
body.admin-lock-dashboard .gx-layout-content > :not(.admin-route-overlay) {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  max-height: 0 !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
  pointer-events: none !important;
  opacity: 0 !important;
}

/* Hide legacy React page when custom overlay is active */
.gx-layout-content.admin-route-overlay-active > :not(.admin-route-overlay),
.gx-layout-content > .admin-react-host-hidden {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  max-height: 0 !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
  pointer-events: none !important;
  opacity: 0 !important;
}

.admin-route-overlay .adm-dash {
  overflow: visible;
}

.gx-app-layout .ant-layout-footer {
  padding: 6px 16px !important;
  background: transparent !important;
  font-size: 12px;
}

/* Hide theme customizer floating button (orange gear) */
.gx-customizer,
.ant-float-btn,
[class*='customizer'] {
  display: none !important;
}

/* ── Sidebar & navigation ── */
.gx-app-sidebar.ant-layout-sider {
  background: var(--admin-sidebar-bg) !important;
  border-right: 1px solid rgba(255, 255, 255, 0.06) !important;
  box-shadow: none !important;
  z-index: 20;
}

.gx-app-sidebar .ant-layout-sider-children {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

/* Chỉ menu area co giãn — KHÔNG cho header logo flex:1 (gây khoảng trống khổng lồ) */
.gx-app-sidebar .gx-sidebar-content {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.gx-app-sidebar .ant-layout-sider-children > .gx-layout-sider-header {
  flex: 0 0 auto !important;
  height: auto !important;
  min-height: 0 !important;
  padding: 8px 12px 6px !important;
  padding-left: 12px !important;
  margin: 0 !important;
  box-shadow: none !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: transparent !important;
}

.gx-app-sidebar:not(.gx-layout-sider-dark) .ant-layout-sider-children > .gx-layout-sider-header {
  border-bottom-color: var(--admin-border);
}

.gx-app-sidebar .ant-layout-sider-children > .gx-layout-sider-header .gx-site-logo img,
.gx-app-sidebar .ant-layout-sider-children > .gx-layout-sider-header img {
  max-height: 34px;
  width: auto;
  display: block;
}

/* Logo / brand + profile stack — compact (override gaxon flex gap) */
.gx-app-sidebar .gx-sidebar-notifications,
.gx-drawer-sidebar .gx-sidebar-notifications {
  flex: 0 0 auto !important;
  padding: 6px 12px 4px !important;
  margin: 0 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 0;
}

.gx-app-sidebar:not(.gx-layout-sider-dark) .gx-sidebar-notifications,
.gx-drawer-sidebar:not(.gx-drawer-sidebar-dark) .gx-sidebar-notifications {
  border-bottom-color: var(--admin-border);
}

.gx-app-sidebar .gx-app-logo-wid,
.gx-drawer-sidebar .gx-app-logo-wid {
  margin-bottom: 0 !important;
  flex: 0 0 auto !important;
}

.gx-app-sidebar .gx-layout-sider-header,
.gx-app-sidebar .gx-sidebar-logo,
.gx-drawer-sidebar .gx-layout-sider-header {
  height: auto !important;
  min-height: 0 !important;
  padding: 4px 4px 8px !important;
  padding-left: 4px !important;
  border-bottom: none !important;
  margin-bottom: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}

.gx-app-sidebar .gx-sidebar-notifications .gx-avatar-row,
.gx-drawer-sidebar .gx-sidebar-notifications .gx-avatar-row {
  margin: 0 !important;
  padding: 4px 2px 2px !important;
  border-top: none !important;
  display: flex;
  align-items: center;
  gap: 8px;
}

.gx-app-sidebar .gx-sidebar-notifications .gx-mb-4,
.gx-drawer-sidebar .gx-sidebar-notifications .gx-mb-4 {
  margin-bottom: 0 !important;
}

.gx-app-sidebar .gx-sidebar-notifications .gx-app-nav:empty,
.gx-drawer-sidebar .gx-sidebar-notifications .gx-app-nav:empty {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
  min-height: 0 !important;
}

.gx-app-sidebar:not(.gx-layout-sider-dark) .gx-sidebar-notifications .gx-avatar-row {
  border-top-color: var(--admin-border);
}

.gx-app-sidebar .gx-sidebar-notifications .gx-avatar-row .ant-avatar,
.gx-drawer-sidebar .gx-sidebar-notifications .gx-avatar-row .ant-avatar {
  flex-shrink: 0;
  margin: 0 !important;
  left: 0 !important;
}

.gx-app-sidebar .gx-sidebar-notifications .gx-avatar-name,
.gx-drawer-sidebar .gx-sidebar-notifications .gx-avatar-name {
  font-size: 13px !important;
  font-weight: 600 !important;
  color: var(--admin-sidebar-text-active) !important;
  line-height: 1.3;
}

.gx-app-sidebar:not(.gx-layout-sider-dark) .gx-sidebar-notifications .gx-avatar-name {
  color: var(--admin-text) !important;
}

.gx-app-sidebar .gx-layout-sider-scrollbar,
.gx-drawer-sidebar .gx-layout-sider-scrollbar {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  height: auto !important;
  max-height: none !important;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  margin-top: 0 !important;
  padding-top: 0 !important;
}

.gx-app-sidebar .gx-no-header-notifications + .gx-layout-sider-scrollbar,
.gx-drawer-sidebar .gx-no-header-notifications + .gx-layout-sider-scrollbar,
.gx-app-sidebar .gx-layout-sider-scrollbar,
.gx-drawer-sidebar .gx-layout-sider-scrollbar {
  height: auto !important;
  min-height: 0 !important;
}

.gx-app-sidebar .gx-layout-sider-header .gx-site-logo,
.gx-app-sidebar .gx-sidebar-logo img,
.gx-app-sidebar .gx-app-logo img {
  max-height: 36px;
  width: auto;
  object-fit: contain;
  filter: none !important;
}

.gx-drawer-sidebar .gx-site-logo img,
.gx-drawer-sidebar .gx-layout-sider-header img {
  filter: none !important;
  max-height: 40px;
  object-fit: contain;
}

.gx-app-sidebar .gx-layout-sider-header h2,
.gx-app-sidebar .gx-sidebar-logo h2 {
  color: var(--admin-sidebar-text-active) !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  margin: 0 !important;
  letter-spacing: -0.01em;
}

/* Menu scroll area */
.gx-app-sidebar .ant-menu-root,
.gx-drawer-sidebar .ant-menu-root {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 4px 0 10px !important;
  background: transparent !important;
  border: none !important;
}

.gx-app-sidebar .ant-menu-root::-webkit-scrollbar,
.gx-drawer-sidebar .ant-menu-root::-webkit-scrollbar {
  width: 4px;
}

.gx-app-sidebar .ant-menu-root::-webkit-scrollbar-thumb,
.gx-drawer-sidebar .ant-menu-root::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

/* Menu items — dark theme */
.gx-app-sidebar .ant-menu-dark,
.gx-app-sidebar .ant-menu-dark .ant-menu-sub,
.gx-drawer-sidebar-dark .ant-menu-dark,
.gx-drawer-sidebar-dark .ant-menu-dark .ant-menu-sub {
  background: transparent !important;
  color: var(--admin-sidebar-text);
}

.gx-app-sidebar .ant-menu-dark .ant-menu-sub {
  background: rgba(0, 0, 0, 0.18) !important;
  border-radius: 8px;
  margin: 2px 8px 6px !important;
  padding: 4px 0 !important;
}

.gx-app-sidebar .ant-menu-item,
.gx-app-sidebar .ant-menu-submenu-title,
.gx-drawer-sidebar .ant-menu-item,
.gx-drawer-sidebar .ant-menu-submenu-title {
  margin: 2px 10px !important;
  width: calc(100% - 20px) !important;
  height: 40px !important;
  line-height: 40px !important;
  border-radius: 8px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  transition: background 0.15s ease, color 0.15s ease;
}

.gx-app-sidebar .ant-menu-sub .ant-menu-item {
  height: 36px !important;
  line-height: 36px !important;
  font-size: 12.5px !important;
  font-weight: 400 !important;
  margin: 1px 6px !important;
  width: calc(100% - 12px) !important;
}

.gx-app-sidebar .ant-menu-item .ant-menu-item-icon,
.gx-app-sidebar .ant-menu-submenu-title .ant-menu-item-icon,
.gx-app-sidebar .ant-menu-item .anticon,
.gx-app-sidebar .ant-menu-submenu-title .anticon {
  font-size: 16px !important;
  min-width: 18px;
  opacity: 0.9;
}

.gx-app-sidebar .ant-menu-item:hover,
.gx-app-sidebar .ant-menu-submenu-title:hover,
.gx-drawer-sidebar .ant-menu-item:hover,
.gx-drawer-sidebar .ant-menu-submenu-title:hover {
  background: var(--admin-sidebar-hover) !important;
  color: var(--admin-sidebar-text-active) !important;
}

.gx-app-sidebar .ant-menu-item-selected,
.gx-drawer-sidebar .ant-menu-item-selected {
  background: var(--admin-sidebar-active-bg) !important;
  color: var(--admin-sidebar-text-active) !important;
  font-weight: 600 !important;
  box-shadow: inset 3px 0 0 var(--admin-primary);
}

.gx-app-sidebar .ant-menu-item-selected::after,
.gx-drawer-sidebar .ant-menu-item-selected::after {
  display: none !important;
}

.gx-app-sidebar .ant-menu-submenu-selected > .ant-menu-submenu-title,
.gx-drawer-sidebar .ant-menu-submenu-selected > .ant-menu-submenu-title {
  color: var(--admin-sidebar-text-active) !important;
  font-weight: 600 !important;
}

.gx-app-sidebar .ant-menu-submenu-open > .ant-menu-submenu-title,
.gx-drawer-sidebar .ant-menu-submenu-open > .ant-menu-submenu-title {
  background: rgba(255, 255, 255, 0.04) !important;
}

.gx-app-sidebar .ant-menu-submenu-arrow,
.gx-drawer-sidebar .ant-menu-submenu-arrow {
  color: rgba(255, 255, 255, 0.45) !important;
  transition: transform 0.2s ease;
}

.gx-app-sidebar .ant-menu-submenu-open > .ant-menu-submenu-title .ant-menu-submenu-arrow,
.gx-drawer-sidebar .ant-menu-submenu-open > .ant-menu-submenu-title .ant-menu-submenu-arrow {
  color: rgba(255, 255, 255, 0.75) !important;
}

/* Lite / light sidebar variant */
.gx-app-sidebar.ant-layout-sider:not(.gx-layout-sider-dark) {
  background: #ffffff !important;
  border-right-color: var(--admin-border) !important;
}

.gx-app-sidebar:not(.gx-layout-sider-dark) .ant-menu-light,
.gx-app-sidebar:not(.gx-layout-sider-dark) .gx-layout-sider-header {
  border-bottom-color: var(--admin-border) !important;
}

.gx-app-sidebar:not(.gx-layout-sider-dark) .ant-menu-item,
.gx-app-sidebar:not(.gx-layout-sider-dark) .ant-menu-submenu-title {
  color: #434343 !important;
}

.gx-app-sidebar:not(.gx-layout-sider-dark) .ant-menu-item:hover,
.gx-app-sidebar:not(.gx-layout-sider-dark) .ant-menu-submenu-title:hover {
  background: #f5f7fa !important;
  color: var(--admin-primary) !important;
}

.gx-app-sidebar:not(.gx-layout-sider-dark) .ant-menu-item-selected {
  background: #e6f4ff !important;
  color: var(--admin-primary) !important;
  box-shadow: inset 3px 0 0 var(--admin-primary);
}

.gx-app-sidebar:not(.gx-layout-sider-dark) .ant-menu-light .ant-menu-sub {
  background: #f8fafc !important;
}

/* User profile footer in sidebar (only when rendered outside notifications block) */
.gx-app-sidebar .gx-user-profile,
.gx-app-sidebar .gx-sidebar-user,
.gx-drawer-sidebar .gx-user-profile {
  margin-top: auto;
  padding: 12px 14px !important;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.12);
}

.gx-app-sidebar .gx-sidebar-notifications .gx-user-profile,
.gx-app-sidebar .gx-sidebar-notifications .gx-sidebar-user,
.gx-drawer-sidebar .gx-sidebar-notifications .gx-user-profile {
  margin-top: 0 !important;
  padding: 0 !important;
  border-top: none !important;
  background: transparent !important;
}

.gx-app-sidebar:not(.gx-layout-sider-dark) .gx-user-profile {
  border-top-color: var(--admin-border) !important;
  background: #f8fafc !important;
}

/* Mini / collapsed sidebar */
.gx-app-sidebar.ant-layout-sider-collapsed .ant-menu-item,
.gx-app-sidebar.ant-layout-sider-collapsed .ant-menu-submenu-title {
  margin: 4px 8px !important;
  width: calc(100% - 16px) !important;
  padding-inline: 0 !important;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gx-app-sidebar.ant-layout-sider-collapsed .ant-menu-item-selected {
  box-shadow: none;
  background: var(--admin-sidebar-active-bg) !important;
}

/* Mobile drawer sidebar */
.gx-drawer-sidebar .ant-drawer-body {
  padding: 0 !important;
  background: var(--admin-sidebar-bg) !important;
}

.gx-drawer-sidebar-dark .ant-drawer-body {
  background: var(--admin-sidebar-bg) !important;
}

/* ── Top header bar ── */
.gx-header,
.gx-app-layout .ant-layout-header,
.gx-inside-header,
.gx-topbar {
  background: #ffffff !important;
  border-bottom: 1px solid var(--admin-border) !important;
  box-shadow: none !important;
  height: 56px !important;
  line-height: 56px !important;
  padding: 0 16px !important;
}

.gx-header-notifications .icon,
.gx-header .gx-icon-btn,
.gx-topbar .gx-icon-btn {
  color: #595959 !important;
  border-radius: 8px;
  transition: background 0.15s ease;
}

.gx-header .gx-icon-btn:hover,
.gx-topbar .gx-icon-btn:hover {
  background: #f5f5f5 !important;
  color: var(--admin-primary) !important;
}

.gx-layout-sider-trigger {
  background: var(--admin-sidebar-bg-sub) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
  color: rgba(255, 255, 255, 0.65) !important;
}

.gx-app-sidebar:not(.gx-layout-sider-dark) + .gx-layout-sider-trigger,
.gx-app-sidebar:not(.gx-layout-sider-dark) ~ .ant-layout .gx-layout-sider-trigger {
  background: #fafafa !important;
  border-top-color: var(--admin-border) !important;
  color: #595959 !important;
}

@media (max-width: 768px) {
  .gx-app-sidebar.ant-layout-sider {
    position: fixed !important;
  }
}

/* ══════════════════════════════════════
   DASHBOARD (#/dashboard)
   ══════════════════════════════════════ */
.admin-dashboard {
  padding: 0 !important;
  max-width: 1600px;
  margin: 0 auto;
}

.admin-dashboard > div[style*="padding"] {
  padding: 0 !important;
}

.admin-dashboard > .ant-spin-nested-loading,
.admin-dashboard > .ant-spin-nested-loading > .ant-spin-container {
  width: 100%;
}

/* Less vertical gap between rows */
.admin-dashboard .ant-row {
  margin-bottom: 0 !important;
  row-gap: 10px !important;
}

.admin-dashboard .ant-row + .ant-row {
  margin-top: 10px !important;
}

/* ── Alerts (profit formula + wallet balance) ── */
.admin-dashboard .ant-alert {
  border-radius: var(--admin-radius);
  margin-bottom: 8px !important;
  padding: 8px 12px !important;
  border: 1px solid var(--admin-border);
  box-shadow: var(--admin-shadow);
}

.admin-dashboard .ant-alert-with-description .ant-alert-message {
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 0;
  display: inline;
}

.admin-dashboard .ant-alert-description {
  font-size: 12px;
  line-height: 1.4;
  color: var(--admin-text-muted);
  margin-top: 4px;
}

.admin-dashboard .ant-alert.admin-alert-collapsed .ant-alert-description {
  display: none;
}

.admin-dashboard .ant-alert.admin-alert-collapsed {
  padding-bottom: 8px !important;
}

.admin-dashboard .ant-alert-warning.admin-alert-collapsed .ant-alert-message::after {
  content: ' (xem KPI bên dưới)';
  font-weight: 400;
  font-size: 11px;
  color: var(--admin-text-muted);
}

.admin-dashboard .admin-alert-toggle {
  margin-left: 8px;
  padding: 0 6px;
  font-size: 11px;
  color: var(--admin-primary);
  cursor: pointer;
  border: none;
  background: transparent;
  text-decoration: underline;
}

/* Stack alerts horizontally on wide screens */
@media (min-width: 992px) {
  .admin-dashboard .admin-alerts-row {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 10px;
  }

  .admin-dashboard .admin-alerts-row .ant-alert {
    margin-bottom: 0 !important;
    height: 100%;
  }
}

/* ── KPI stat cards (5 cards top row) ── */
.admin-dashboard .admin-kpi-row {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

@media (min-width: 768px) {
  .admin-dashboard .admin-kpi-row {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1200px) {
  .admin-dashboard .admin-kpi-row {
    grid-template-columns: repeat(5, 1fr);
  }
}

.admin-dashboard .admin-kpi-row > .ant-col {
  max-width: 100% !important;
  flex: none !important;
  width: 100% !important;
  padding: 0 !important;
}

.admin-dashboard .admin-kpi-row .ant-card {
  height: 100%;
  margin-bottom: 0 !important;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.admin-dashboard .admin-kpi-row .ant-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
}

.admin-dashboard .admin-kpi-row .ant-card-body {
  padding: 12px 14px !important;
}

.admin-dashboard .admin-kpi-row h5.ant-typography,
.admin-dashboard .admin-kpi-row .ant-typography h5 {
  font-size: 16px !important;
  font-weight: 700 !important;
  color: var(--admin-text) !important;
  line-height: 1.3 !important;
  word-break: break-word;
}

.admin-dashboard .admin-kpi-row .ant-typography-secondary {
  font-size: 12px !important;
  color: var(--admin-text-muted) !important;
}

/* Negative profit highlight */
.admin-dashboard .admin-kpi-profit-negative h5.ant-typography,
.admin-dashboard .admin-kpi-profit-negative .ant-typography h5 {
  color: var(--admin-danger) !important;
}

.admin-dashboard .admin-kpi-profit-negative .anticon-arrow-up,
.admin-dashboard .admin-kpi-profit-negative [class*='arrow'] {
  transform: rotate(180deg);
}

.admin-dashboard .admin-kpi-profit-positive h5.ant-typography,
.admin-dashboard .admin-kpi-profit-positive .ant-typography h5 {
  color: var(--admin-success) !important;
}

.admin-dashboard .admin-kpi-row div[style*='border-radius: 50%'],
.admin-dashboard .admin-kpi-row div[style*='border-radius:50%'] {
  width: 42px !important;
  height: 42px !important;
}

/* ── Chart section ── */
.admin-dashboard .admin-chart-row .ant-card-body {
  padding: 12px 16px 8px !important;
}

.admin-dashboard .admin-chart-row .recharts-wrapper,
.admin-dashboard .admin-chart-row canvas {
  max-height: 300px !important;
}

.admin-dashboard .admin-chart-row .ant-card-head-title {
  font-size: 14px !important;
}

/* Chart toolbar (date picker row) */
.admin-dashboard .ant-picker-range,
.admin-dashboard .ant-select {
  font-size: 13px;
}

/* ── Deposit / Withdraw info ── */
.admin-dashboard .admin-deposit-withdraw-row {
  display: grid !important;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 10px;
}

.admin-dashboard .admin-deposit-withdraw-row > .ant-row,
.admin-dashboard .admin-deposit-withdraw-row > .admin-deposit-withdraw-item {
  margin: 0 !important;
}

@media (min-width: 992px) {
  .admin-dashboard .admin-deposit-withdraw-row {
    grid-template-columns: 1fr 1fr;
  }
}

.admin-dashboard .admin-deposit-withdraw-row > .ant-col,
.admin-dashboard .admin-deposit-withdraw-row > .ant-row > .ant-col {
  max-width: 100% !important;
  flex: none !important;
  width: 100% !important;
  padding: 0 !important;
}

.admin-dashboard .ant-row.admin-deposit-withdraw-row > .ant-col {
  max-width: 100% !important;
  flex: none !important;
  width: 100% !important;
  padding: 0 !important;
}

/* Inner request status items — compact */
.admin-dashboard .admin-request-card .ant-card-head {
  min-height: 38px !important;
  padding: 0 14px !important;
}

.admin-dashboard .admin-request-card .ant-card-body {
  padding: 10px 12px !important;
}

.admin-dashboard .admin-request-card .ant-card .ant-card {
  margin-bottom: 8px !important;
  border-radius: 8px !important;
  background: #fafafa !important;
  border: 1px solid #f0f0f0 !important;
  box-shadow: none !important;
}

.admin-dashboard .admin-request-card .ant-card .ant-card:last-child {
  margin-bottom: 0 !important;
}

.admin-dashboard .admin-request-card .ant-card .ant-card-body {
  padding: 10px 12px !important;
}

.admin-dashboard .admin-request-card .ant-btn-circle {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
}

/* ── Revenue / Expense tables (2 columns) ── */
.admin-dashboard .admin-tables-row {
  display: grid !important;
  grid-template-columns: 1fr;
  gap: 10px;
}

@media (min-width: 992px) {
  .admin-dashboard .admin-tables-row {
    grid-template-columns: 1fr 1fr;
  }
}

.admin-dashboard .admin-tables-row > .ant-col {
  max-width: 100% !important;
  flex: none !important;
  width: 100% !important;
  padding: 0 !important;
}

.admin-dashboard .admin-tables-row .ant-table-wrapper {
  max-height: 280px;
  overflow: auto;
  border: 1px solid #f0f0f0;
  border-radius: 8px;
}

/* ── Top members — full width ── */
.admin-dashboard .admin-top-users-row {
  display: block !important;
}

.admin-dashboard .admin-top-users-row > .ant-col {
  max-width: 100% !important;
  flex: 0 0 100% !important;
  width: 100% !important;
}

.admin-dashboard .admin-top-users-row .ant-col[class*='md-12'],
.admin-dashboard .admin-top-users-row .ant-col[class*='lg-12'] {
  max-width: 100% !important;
  flex: 0 0 100% !important;
}

.admin-dashboard .admin-top-users-row .ant-table-wrapper {
  max-height: 320px;
}

/* ── General cards inside dashboard ── */
.admin-dashboard .ant-card {
  border-radius: var(--admin-radius) !important;
  border: 1px solid var(--admin-border) !important;
  box-shadow: var(--admin-shadow) !important;
  margin-bottom: 0 !important;
}

.admin-dashboard .ant-card-head {
  min-height: 40px !important;
  padding: 0 14px !important;
  border-bottom: 1px solid #f0f0f0 !important;
}

.admin-dashboard .ant-card-head-title {
  font-size: 14px !important;
  font-weight: 600 !important;
  padding: 8px 0 !important;
  white-space: normal !important;
  line-height: 1.35 !important;
}

.admin-dashboard .ant-card-body {
  padding: 12px 14px !important;
}

/* ── Tables (global in content area) ── */
.gx-layout-content .ant-table-thead > tr > th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #fafafa !important;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 10px !important;
}

.gx-layout-content .ant-table-tbody > tr > td {
  font-size: 13px;
  padding: 7px 10px !important;
}

.gx-layout-content .ant-table-tbody > tr:hover > td {
  background: #f5f9ff !important;
}

/* ── Buttons & inputs ── */
.ant-btn-primary {
  background: var(--admin-primary) !important;
  border-color: var(--admin-primary) !important;
  border-radius: 8px !important;
  box-shadow: none !important;
}

.ant-btn-primary:hover {
  background: var(--admin-primary-hover) !important;
  border-color: var(--admin-primary-hover) !important;
}

.ant-input,
.ant-input-affix-wrapper,
.ant-select-selector,
.ant-picker {
  border-radius: 8px !important;
}

/* ── Login page (GOFINPRO) ── */
html.admin-signin-page,
body.admin-signin-page {
  height: auto !important;
  min-height: 100dvh;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
}

.gx-app-login-wrap {
  min-height: 100dvh;
  height: auto;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(255, 196, 0, 0.14) 0%, transparent 55%),
    linear-gradient(165deg, #050505 0%, #121212 45%, #0a0a0a 100%) !important;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 16px max(32px, env(safe-area-inset-bottom));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  position: relative;
  z-index: 1;
}

.gx-app-login-container {
  border-radius: 20px !important;
  overflow: visible !important;
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 196, 0, 0.12) !important;
  margin: auto;
  width: 100%;
  max-width: 920px;
}

.gx-app-login-main-content {
  display: flex !important;
  min-height: auto !important;
  flex-direction: column;
  border-radius: 20px;
  overflow: hidden;
}

.gx-app-logo-content {
  width: 100% !important;
  background: #000 !important;
  padding: 28px 24px !important;
  border-bottom: 1px solid rgba(255, 196, 0, 0.15);
}

.gx-app-logo-content-bg {
  min-height: auto !important;
  padding: 8px 0 !important;
}

.gx-app-logo-content img {
  filter: none !important;
  width: auto !important;
  max-width: min(100%, 320px) !important;
  height: auto !important;
  max-height: 80px !important;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.gx-app-login-content {
  padding: 32px 28px 36px !important;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  background: #141414 !important;
  flex: 1;
  position: relative;
  z-index: 2;
}

.gx-app-login-content .title-login {
  font-size: 24px !important;
  font-weight: 700 !important;
  margin-bottom: 8px !important;
  color: #ffc400 !important;
  letter-spacing: -0.02em;
}

.gx-app-login-content .title-login::after {
  content: 'Quản trị hệ thống giao dịch';
  display: block;
  font-size: 14px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.55);
  margin-top: 6px;
}

.gx-signin-form {
  width: 100% !important;
  max-width: 380px;
  margin: 0 auto;
}

.gx-signin-form .ant-input-affix-wrapper,
.gx-signin-form .ant-input {
  background: #1f1f1f !important;
  border-color: #333 !important;
  color: #fff !important;
  min-height: 46px;
}

.gx-signin-form .ant-input-affix-wrapper:hover,
.gx-signin-form .ant-input-affix-wrapper-focused {
  border-color: #ffc400 !important;
  box-shadow: 0 0 0 2px rgba(255, 196, 0, 0.15) !important;
}

.gx-signin-form .ant-input-prefix {
  color: #ffc400 !important;
}

.gx-signin-form .ant-btn-primary {
  height: 48px !important;
  font-weight: 700 !important;
  margin-top: 12px;
  border: none !important;
  background: linear-gradient(135deg, #ffd028 0%, #ffb800 100%) !important;
  color: #111 !important;
  border-radius: 10px !important;
  box-shadow: 0 8px 24px rgba(255, 184, 0, 0.25);
  touch-action: manipulation;
  position: relative;
  z-index: 5;
}

.gx-signin-form .ant-btn-primary:hover {
  background: linear-gradient(135deg, #ffe066 0%, #ffc400 100%) !important;
  color: #000 !important;
}

/* 2FA setup / verify on login page */
.gx-app-login-content .ant-card,
.gx-app-login-content .verify-2fa-card,
.gx-app-login-content .auth-container {
  background: #1a1a1a !important;
  border: 1px solid #3a3a3a !important;
  color: #f5f5f5 !important;
  max-width: 100% !important;
  box-shadow: none !important;
}

.gx-app-login-content .ant-card-body {
  background: #1a1a1a !important;
  color: #f5f5f5 !important;
  padding: 24px 20px !important;
}

.gx-app-login-content .ant-typography,
.gx-app-login-content .ant-typography p,
.gx-app-login-content h1,
.gx-app-login-content h2,
.gx-app-login-content h3,
.gx-app-login-content h4,
.gx-app-login-content label,
.gx-app-login-content span,
.gx-app-login-content p,
.gx-app-login-content div {
  color: inherit;
}

.gx-app-login-content .ant-typography,
.gx-app-login-content .ant-typography-title,
.gx-app-login-content .ant-typography h1,
.gx-app-login-content .ant-typography h2,
.gx-app-login-content .ant-typography h3,
.gx-app-login-content .ant-typography h4,
.gx-app-login-content .auth-container h2,
.gx-app-login-content .verify-2fa-card h2 {
  color: #ffc400 !important;
}

.gx-app-login-content .ant-typography-secondary,
.gx-app-login-content .ant-typography.ant-typography-secondary,
.gx-app-login-content span[style*="color"],
.gx-app-login-content .ant-steps-item-description,
.gx-app-login-content .ant-steps-item-description span {
  color: rgba(255, 255, 255, 0.72) !important;
}

.gx-app-login-content .ant-steps-item-title,
.gx-app-login-content .ant-steps-item-title span {
  color: #ffffff !important;
}

.gx-app-login-content .ant-steps-item-description {
  color: rgba(255, 255, 255, 0.65) !important;
}

.gx-app-login-content .ant-steps-item-process .ant-steps-item-title,
.gx-app-login-content .ant-steps-item-finish .ant-steps-item-title {
  color: #ffc400 !important;
}

.gx-app-login-content .ant-steps-item-process .ant-steps-icon-dot,
.gx-app-login-content .ant-steps-item-finish .ant-steps-icon-dot {
  background: #ffc400 !important;
}

.gx-app-login-content .ant-steps-item-wait .ant-steps-icon-dot {
  background: #555 !important;
}

/* QR / secret key boxes (override light inline backgrounds) */
.gx-app-login-content div[style*="background"],
.gx-app-login-content .ant-typography code,
.gx-app-login-content code {
  background: #252525 !important;
  border-color: #444 !important;
  color: #ffe082 !important;
}

.gx-app-login-content div[style*="f7f9fc"],
.gx-app-login-content div[style*="f9fafb"],
.gx-app-login-content div[style*="f0f7ff"] {
  background: #252525 !important;
  border-color: #444 !important;
}

.gx-app-login-content img[alt*="QR"] {
  background: #fff !important;
  padding: 10px !important;
  border-radius: 8px !important;
}

.gx-app-login-content .ant-alert {
  background: #2a1a1a !important;
  border: 1px solid #5c3030 !important;
}

.gx-app-login-content .ant-alert-message {
  color: #ffb4b4 !important;
}

.gx-app-login-content .ant-alert-description {
  color: rgba(255, 255, 255, 0.75) !important;
}

.gx-app-login-content .ant-input,
.gx-app-login-content textarea.ant-input {
  background: #1f1f1f !important;
  border-color: #444 !important;
  color: #fff !important;
}

.gx-app-login-content .ant-input::placeholder {
  color: rgba(255, 255, 255, 0.35) !important;
}

.gx-app-login-content .ant-btn-default {
  background: #2a2a2a !important;
  border-color: #555 !important;
  color: #fff !important;
}

.gx-app-login-content .ant-btn-default:hover {
  background: #333 !important;
  border-color: #ffc400 !important;
  color: #ffc400 !important;
}

.gx-app-login-content .ant-btn-primary {
  background: linear-gradient(135deg, #ffd028 0%, #ffb800 100%) !important;
  border: none !important;
  color: #111 !important;
}

.gx-app-login-content .ant-spin-text {
  color: rgba(255, 255, 255, 0.7) !important;
}

.gx-app-login-content .ant-divider {
  border-color: #333 !important;
}

.gx-app-login-content .ant-btn {
  touch-action: manipulation !important;
  pointer-events: auto !important;
  position: relative;
  z-index: 5;
  min-height: 44px;
}

.gx-app-login-content .ant-space,
.gx-app-login-content .ant-space-horizontal {
  flex-wrap: wrap;
  gap: 12px !important;
}

.gx-loader-view {
  pointer-events: none !important;
}

@media (min-width: 769px) {
  .gx-app-login-wrap {
    align-items: center;
    padding: 32px 24px;
  }

  .gx-app-login-main-content {
    flex-direction: row !important;
    min-height: 440px !important;
  }

  .gx-app-logo-content {
    width: 42% !important;
    min-height: 440px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: none !important;
    border-right: 1px solid rgba(255, 196, 0, 0.15);
  }

  .gx-app-logo-content img {
    max-height: 120px !important;
  }
}

@media (max-width: 768px) {
  .gx-app-login-wrap {
    align-items: flex-start;
  }

  .gx-app-login-content {
    padding: 24px 20px 28px !important;
    padding-bottom: max(28px, env(safe-area-inset-bottom)) !important;
  }

  .gx-app-login-content .ant-space-horizontal {
    flex-direction: column !important;
    width: 100% !important;
  }

  .gx-app-login-content .ant-space-horizontal .ant-btn {
    width: 100% !important;
    min-width: 0 !important;
  }

  .gx-app-login-content .ant-card-body,
  .gx-app-login-content .verify-2fa-card > div {
    padding-bottom: max(24px, env(safe-area-inset-bottom)) !important;
  }

  .admin-dashboard .admin-kpi-row {
    grid-template-columns: 1fr !important;
  }
}

/* ── Pro-table / list pages ── */
.ant-pro-table .ant-pro-table-search {
  border-radius: var(--admin-radius);
  margin-bottom: 12px;
  padding: 14px !important;
}

.gx-layout-content .ant-card {
  border-radius: var(--admin-radius) !important;
  border: 1px solid var(--admin-border) !important;
  box-shadow: var(--admin-shadow) !important;
}

/* ── Scrollbar ── */
.gx-layout-content ::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.gx-layout-content ::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

.gx-layout-content ::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* ── Deposit / Withdraw — compact table UX ── */
.admin-dw-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0 0 12px;
  padding: 10px 14px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #f0f0f0;
}

.admin-dw-header--deposit {
  border-left: 3px solid #1677ff;
}

.admin-dw-header--withdraw {
  border-left: 3px solid #fa8c16;
}

.admin-dw-header__text h2 {
  margin: 0 !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  color: #141414 !important;
}

.admin-dw-header__legend {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.admin-tx-mini-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}

.admin-tx-mini-badge--internal {
  background: #e6f4ff;
  color: #1677ff;
}

.admin-tx-mini-badge--chain {
  background: #f6ffed;
  color: #389e0d;
}

.admin-tx-mini-badge--admin {
  background: #fff7e6;
  color: #d46b08;
}

.admin-tx-admin-reason {
  display: inline-block;
  margin-left: 6px;
  font-size: 11px;
  color: #595959;
  max-width: 200px;
  vertical-align: middle;
}

.admin-deposit-page .ant-table-tbody > tr.admin-deposit-processed > td,
.admin-withdraw-page .ant-table-tbody > tr.admin-withdraw-processed > td {
  padding-top: 8px !important;
  padding-bottom: 8px !important;
  vertical-align: middle !important;
}

.admin-tx-flow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  line-height: 1.4;
}

.admin-tx-flow__arrow {
  color: #bfbfbf;
  font-size: 12px;
  flex-shrink: 0;
}

.admin-tx-user {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  white-space: nowrap;
}

a.admin-tx-user,
a.admin-user-chip.admin-customer-nav-link {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

a.admin-tx-user:hover .admin-tx-user__id,
a.admin-tx-user:hover .admin-tx-user__nick,
a.admin-user-chip.admin-customer-nav-link:hover .admin-user-chip__id,
a.admin-user-chip.admin-customer-nav-link:hover .admin-user-chip__nick {
  color: #1677ff;
}

a.admin-customer-nav-link .admin-user-chip__id,
a.admin-tx-user .admin-tx-user__id {
  color: #1677ff;
  font-weight: 600;
}

.customer-id-primary[data-admin-customer-nav='1'] {
  color: #1677ff;
  cursor: pointer;
  font-weight: 600;
}

.customer-id-primary[data-admin-customer-nav='1']:hover {
  text-decoration: underline;
}

.ant-modal-mask.admin-modal-mask-cleared {
  display: none !important;
  pointer-events: none !important;
  visibility: hidden !important;
}

.admin-tx-user__nick {
  font-size: 13px;
  font-weight: 600;
  color: #262626;
}

.admin-tx-user__id {
  font-size: 11px;
  color: #8c8c8c;
  font-variant-numeric: tabular-nums;
}

.admin-tx-muted {
  color: #bfbfbf;
  font-size: 12px;
}

.admin-tx-txlink {
  margin-left: 4px;
  font-size: 11px;
  color: #1677ff;
  text-decoration: none;
}

.admin-tx-txlink:hover {
  text-decoration: underline;
}

.admin-deposit-page .ant-table-thead th,
.admin-withdraw-page .ant-table-thead th {
  font-weight: 600 !important;
  font-size: 12px !important;
  white-space: nowrap;
  background: #fafafa !important;
}

.admin-deposit-type-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 0 0 10px;
  padding: 8px 12px;
  background: #fff;
  border: 1px solid #f0f0f0;
  border-radius: 8px;
}

/* Khối filter TRÊN bảng — full width, không bị tab/toolbar đè */
body.admin-deposit-page .gx-layout-content .ant-pro-table .ant-pro-card-body {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 18px !important;
  position: relative;
  overflow: visible !important;
}

body.admin-deposit-page .ant-pro-card-body.admin-deposit-layout-ready > .ant-table-wrapper {
  order: 10;
  flex: 0 0 auto;
  margin-top: 0 !important;
}

/* 1) Form Trạng thái / Thời gian */
.admin-deposit-filters-top {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
  margin: 0 !important;
  padding: 0;
  clear: both;
  position: relative !important;
  z-index: 30;
  flex: 0 0 auto;
  order: 1;
  isolation: isolate;
  overflow: visible !important;
}

/* 2) Loại nạp — khối riêng, không nằm trong form search */
.admin-deposit-type-block {
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
  margin: 0 0 12px !important;
  padding: 4px 0 10px;
  clear: both;
  position: relative !important;
  z-index: 45;
  flex: 0 0 auto;
  order: 2;
  min-height: 56px;
  isolation: isolate;
  overflow: visible !important;
  pointer-events: auto;
}

.admin-deposit-filter-stray-hidden {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
}

.admin-deposit-type-col {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  line-height: 1.35;
}

.admin-deposit-type-col--internal {
  background: #e6f4ff;
  color: #0958d9;
  border: 1px solid #91caff;
}

.admin-deposit-type-col--admin {
  background: #f9f0ff;
  color: #531dab;
  border: 1px solid #d3adf7;
}

.admin-deposit-type-col--chain {
  background: #f6ffed;
  color: #389e0d;
  border: 1px solid #b7eb8f;
}

/* Filter Loại chuyển — trong form tìm kiếm */
.admin-deposit-filter-slot {
  width: 100%;
  flex: 0 0 100%;
  margin: 6px 0 10px;
  padding: 10px 0 4px;
  border-top: 1px dashed #dce3f0;
}

.admin-deposit-type-filter--in-search {
  margin: 0 !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  background: transparent !important;
}

body.admin-deposit-page .admin-deposit-filters-top .ant-pro-table-search {
  background: linear-gradient(180deg, #f8faff 0%, #ffffff 72%) !important;
  border: 1px solid #e2e8f4 !important;
  border-radius: 12px !important;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.06) !important;
}

.admin-deposit-type-filter--prominent .admin-deposit-type-filter__label {
  font-size: 13px;
  font-weight: 700;
  color: #1f2937;
  letter-spacing: 0.02em;
}

.admin-deposit-type-filter--prominent .admin-deposit-type-filter__btn {
  border-radius: 20px;
  padding: 5px 14px;
  font-weight: 600;
  transition: all 0.15s ease;
}

.admin-deposit-type-filter--prominent .admin-deposit-type-filter__btn.is-active {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%) !important;
  color: #fff !important;
  border-color: transparent !important;
  box-shadow: 0 3px 10px rgba(37, 99, 235, 0.35);
}

.admin-deposit-type-filter--prominent .admin-deposit-type-filter__btn[data-type='INTERNAL'].is-active {
  background: linear-gradient(135deg, #0ea5e9 0%, #0369a1 100%) !important;
  box-shadow: 0 3px 10px rgba(14, 165, 233, 0.35);
}

.admin-deposit-type-filter__search {
  background: linear-gradient(135deg, #1677ff 0%, #0958d9 100%) !important;
  border: none !important;
  color: #fff !important;
  font-weight: 600;
  border-radius: 8px;
}

.admin-deposit-detail-link {
  color: #2563eb;
  font-weight: 600;
  font-size: 13px;
  text-decoration: none;
  white-space: nowrap;
}

.admin-deposit-detail-link:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

/* Tác vụ: ẩn Nạp tiền / VIP / icon mắt — chỉ link Chi tiết */
body.admin-deposit-page td[data-admin-deposit-actions] .ant-btn,
body.admin-deposit-page td[data-admin-deposit-actions] button,
body.admin-deposit-page td[data-admin-deposit-actions] .ant-dropdown-trigger,
body.admin-deposit-page td[data-admin-deposit-actions] .anticon-eye,
body.admin-deposit-page td[data-admin-deposit-actions] a:not(.admin-deposit-detail-link) {
  display: none !important;
  visibility: hidden !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
}

body.admin-deposit-page .ant-table-tbody tr td:last-child:has(.admin-deposit-detail-link) .ant-btn,
body.admin-deposit-page .ant-table-tbody tr td:last-child:has(.admin-deposit-detail-link) button,
body.admin-deposit-page .ant-table-tbody tr td:last-child:has(.admin-deposit-detail-link) .ant-dropdown-trigger {
  display: none !important;
}

/* Badge/pagination lạc ra giữa filter và tab */
body.admin-deposit-page .ant-pro-card-body.admin-deposit-layout-ready > .ant-badge,
body.admin-deposit-page .admin-deposit-filters-top ~ .ant-badge:not(.deposit-status-container .ant-badge) {
  display: none !important;
}

body.admin-deposit-page .deposit-status-container {
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%) !important;
  border: 1px solid #e2e8f4 !important;
  border-radius: 12px !important;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04) !important;
}

body.admin-deposit-page .admin-deposit-type-block .admin-deposit-toolbar-wrap,
body.admin-deposit-page .admin-deposit-type-block .admin-deposit-type-filter {
  position: relative !important;
  top: auto !important;
  margin: 0 !important;
  visibility: visible !important;
  opacity: 1 !important;
  display: flex !important;
}

/* 3) Quản lý nạp tiền + tab trạng thái */
.admin-deposit-status-block {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
  margin: 8px 0 0 !important;
  padding: 0;
  clear: both;
  position: relative !important;
  z-index: 8;
  flex: 0 0 auto;
  order: 3;
  isolation: isolate;
  overflow: visible !important;
}

body.admin-deposit-page .ant-pro-card-body.admin-deposit-layout-ready > .ant-pro-table-list-toolbar:not(.admin-deposit-toolbar-relocated) {
  display: none !important;
}

body.admin-deposit-page .admin-deposit-filters-top .ant-pro-table-search {
  overflow: visible !important;
  max-height: none !important;
}

body.admin-deposit-page .admin-deposit-toolbar-hidden {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  visibility: hidden !important;
}

body.admin-deposit-page .admin-deposit-status-block > .ant-pro-table-list-toolbar.admin-deposit-toolbar-relocated {
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  position: relative !important;
  top: auto !important;
  left: auto !important;
  transform: none !important;
  margin-top: 0 !important;
}

body.admin-deposit-page .admin-deposit-status-block .deposit-status-container {
  margin-top: 0 !important;
}

.admin-deposit-toolbar-wrap {
  width: 100% !important;
  max-width: 100% !important;
  clear: both;
  position: relative;
  margin: 0;
  box-sizing: border-box;
}

body.admin-deposit-page .admin-deposit-filters-top .ant-pro-table-search {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 14px 16px !important;
  background: #fff !important;
  border: 1px solid #f0f0f0 !important;
  border-radius: 8px;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  position: relative !important;
  top: auto !important;
  left: auto !important;
  transform: none !important;
  box-sizing: border-box;
  overflow: visible !important;
}

body.admin-deposit-page .admin-deposit-filters-top .ant-pro-table-search .ant-form,
body.admin-deposit-page .admin-deposit-filters-top .ant-pro-table-search .ant-row {
  width: 100% !important;
  max-width: 100% !important;
}

body.admin-deposit-page .admin-deposit-status-block .deposit-status-container,
body.admin-deposit-page .deposit-status-container {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  margin: 0 !important;
  padding: 12px 16px 8px !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
  background: #fff !important;
  border: 1px solid #f0f0f0 !important;
  border-radius: 8px;
  overflow: visible !important;
  transform: none !important;
  z-index: 1;
}

body.admin-deposit-page .deposit-status-container .deposit-tabs-title {
  display: block;
  margin: 0 0 10px;
  padding: 0;
  line-height: 1.4;
}

body.admin-deposit-page .deposit-status-tabs,
body.admin-deposit-page .deposit-status-container .ant-tabs {
  width: 100% !important;
}

/* Toolbar bảng + pagination — không kéo đè lên header */
body.admin-deposit-page .ant-pro-table-list-toolbar,
body.admin-deposit-page .ant-pro-table-list-toolbar-container {
  position: relative !important;
  top: auto !important;
  bottom: auto !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  z-index: 0;
  float: none !important;
}

body.admin-deposit-page .ant-pro-table-list-toolbar-container .ant-pro-table-list-toolbar-title {
  position: relative !important;
}

body.admin-deposit-page .ant-pro-table .ant-pro-table-alert {
  margin-bottom: 8px;
}

/* Badge đếm tab — inline, không float giữa 2 khối */
.deposit-status-container .tab-count,
.deposit-status-tabs .ant-badge,
.deposit-status-tabs .ant-badge-count,
.deposit-status-container .ant-scroll-number {
  position: static !important;
  display: inline-block !important;
  vertical-align: middle;
  margin-left: 6px !important;
  transform: none !important;
  box-shadow: none !important;
  top: auto !important;
  right: auto !important;
}

.deposit-party-single {
  display: inline-flex;
  align-items: center;
}

/* DepositListCtrl — compact user columns (override HTML card cells) */
.admin-deposit-listctrl .deposit-status-container {
  margin-bottom: 0;
}

.admin-deposit-listctrl .admin-deposit-type-filter {
  margin-top: 0;
}

.admin-deposit-listctrl .ant-table-tbody > tr.admin-deposit-listctrl-row > td {
  vertical-align: middle !important;
  padding-top: 8px !important;
  padding-bottom: 8px !important;
}

.admin-deposit-listctrl .ant-table-tbody td .ant-avatar {
  display: none !important;
}

.admin-deposit-listctrl .ant-table-tbody td:has(.admin-tx-user) {
  font-size: 13px;
}

.admin-deposit-listctrl .deposit-tabs-title {
  font-size: 16px !important;
  font-weight: 700 !important;
}

/* Deposit list — HTML cells from API (financial / party / chain) */
.deposit-party-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  line-height: 1.4;
  color: #262626;
}
.deposit-party-flow__arrow {
  color: #595959;
  font-weight: 700;
}
.deposit-wallet {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  font-weight: 600;
  color: #434343;
  background: #f5f5f5;
  padding: 2px 6px;
  border-radius: 4px;
}

/* CMS HtmlContent often renders body text at 45% opacity — force readable deposit cells */
body.admin-deposit-page .ant-table-tbody > tr > td {
  color: #262626 !important;
}
body.admin-deposit-page .ant-table-tbody td .deposit-party-flow,
body.admin-deposit-page .ant-table-tbody td .deposit-party-flow a.admin-tx-user,
body.admin-deposit-page .ant-table-tbody td .admin-tx-user__nick {
  color: #1677ff !important;
  font-weight: 600 !important;
}
body.admin-deposit-page .ant-table-tbody td .admin-tx-user__id {
  color: #0958d9 !important;
  font-weight: 600 !important;
}
body.admin-deposit-page .ant-table-tbody td .deposit-wallet {
  color: #434343 !important;
}
body.admin-deposit-page .deposit-tabs-title {
  color: #141414 !important;
}

.admin-deposit-type-filter--prominent {
  margin: 10px 0 12px !important;
  padding: 10px 14px !important;
  background: #f0f5ff !important;
  border: 1px solid #adc6ff !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.admin-deposit-type-filter--prominent .admin-deposit-type-filter__label {
  font-weight: 700;
  color: #1d39c4;
}
.admin-deposit-type-filter--prominent .admin-deposit-type-filter__btn.is-active {
  background: #1677ff !important;
  border-color: #1677ff !important;
  color: #fff !important;
}
.deposit-fin-box {
  font-size: 12px;
  line-height: 1.35;
  color: #434343;
}
.deposit-fin-box__line {
  color: #722ed1;
}
.deposit-fin-box__line strong {
  font-size: 14px;
  color: #531dab;
}
.deposit-fin-box__icon {
  color: #722ed1;
  font-size: 10px;
}
.deposit-fin-box__sub {
  color: #8c8c8c;
  margin-top: 2px;
}
.deposit-fin-box__total {
  margin-top: 4px;
  font-weight: 600;
  color: #262626;
}

/* Hide customer-list columns if stale page config still renders them */
body.admin-deposit-page th.admin-deposit-hide-col,
body.admin-deposit-page td.admin-deposit-hide-col {
  display: none !important;
}

@media (max-width: 900px) {
  .admin-dw-header__legend {
    width: 100%;
  }
  .admin-tx-flow {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }
  .admin-tx-flow__arrow {
    display: none;
  }
}

/* legacy — hide old expanded detail rows if any remain */
.admin-deposit-page .admin-deposit-detail-row,
.admin-withdraw-page .admin-withdraw-detail-row {
  display: none !important;
}

.admin-status-pill {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
}

.admin-status-pill--success {
  background: #f6ffed;
  color: #389e0d;
}

.admin-status-pill--pending {
  background: #fff7e6;
  color: #d46b08;
}

.admin-status-pill--processing {
  background: #e6f4ff;
  color: #1677ff;
}

body.admin-deposit-page .ant-table-tbody td .admin-status-pill--success {
  color: #389e0d !important;
  background: #f6ffed !important;
  border: 1px solid #b7eb8f !important;
}
body.admin-deposit-page .ant-table-tbody td .admin-status-pill--failed {
  color: #cf1322 !important;
  background: #fff2f0 !important;
  border: 1px solid #ffccc7 !important;
}

.admin-deposit-detail-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1100;
  align-items: center;
  justify-content: center;
}
.admin-deposit-detail-overlay.is-open {
  display: flex;
}
.admin-deposit-detail-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}
.admin-deposit-detail-dialog {
  position: relative;
  z-index: 1;
  width: min(520px, 92vw);
  max-height: 85vh;
  overflow: auto;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.15);
}
.admin-deposit-detail-dialog__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid #f0f0f0;
}
.admin-deposit-detail-dialog__head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}
.admin-deposit-detail-close {
  border: none;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: #8c8c8c;
}
.admin-deposit-detail-dialog__body {
  padding: 16px;
}

.admin-status-pill--failed {
  background: #fff2f0;
  color: #cf1322;
}

/* ── Internal / blockchain detail card (modal) ── */
.admin-dw-detail-panel {
  margin-bottom: 0;
  position: relative;
  z-index: 2;
  pointer-events: auto;
}

.admin-dw-detail-legacy-hidden {
  display: none !important;
}

.admin-dw-detail-internal-only {
  padding-bottom: 8px !important;
}

.admin-dw-detail-internal-only .admin-dw-detail-panel {
  margin-bottom: 0;
}

.admin-dw-form--internal-hidden {
  display: none !important;
}

.admin-dw-detail-hidden-field {
  display: none !important;
}

.admin-tx-card {
  padding: 16px 18px;
  background: #fafafa;
  border: 1px solid #eef0f3;
  border-radius: 12px;
}

.admin-tx-card--internal {
  background: linear-gradient(180deg, #f0f7ff 0%, #fafafa 48%);
  border-color: #d6e4ff;
}

.admin-tx-card--chain {
  background: #fafafa;
}

.admin-tx-card__head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.admin-tx-card__badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.admin-tx-card__badge--internal {
  background: #e6f4ff;
  color: #1677ff;
}

.admin-tx-card__badge--chain {
  background: #f6ffed;
  color: #389e0d;
}

.admin-tx-card__flow {
  display: flex;
  align-items: stretch;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.admin-tx-card__arrow {
  display: flex;
  align-items: center;
  font-size: 22px;
  color: #bfbfbf;
  font-weight: 300;
  padding: 0 4px;
}

.admin-user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 160px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid #f0f0f0;
  border-radius: 10px;
}

.admin-user-chip__avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #1677ff, #4096ff);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.admin-tx-card--internal .admin-user-chip:last-of-type .admin-user-chip__avatar {
  background: linear-gradient(135deg, #52c41a, #73d13d);
}

.admin-user-chip__body {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.admin-user-chip__role {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #8c8c8c;
  font-weight: 600;
}

.admin-user-chip__nick {
  font-size: 15px;
  font-weight: 700;
  color: #141414;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-user-chip__id {
  font-size: 12px;
  color: #1677ff;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.admin-tx-card__foot {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 32px;
  padding-top: 12px;
  border-top: 1px dashed #e8e8e8;
}

.admin-tx-card__amount em,
.admin-tx-card__time em,
.admin-tx-card__kv em {
  display: block;
  font-size: 11px;
  color: #8c8c8c;
  font-style: normal;
  margin-bottom: 2px;
}

.admin-tx-card__amount strong {
  font-size: 22px;
  font-weight: 800;
  color: #1677ff;
  font-variant-numeric: tabular-nums;
}

.admin-tx-card__amount small {
  font-size: 13px;
  font-weight: 600;
  color: #8c8c8c;
}

.admin-tx-card__time strong {
  font-size: 14px;
  color: #434343;
  font-variant-numeric: tabular-nums;
}

.admin-tx-card__note {
  margin-top: 10px;
  font-size: 12px;
  color: #595959;
  padding: 8px 10px;
  background: #fffbe6;
  border-radius: 8px;
}

.admin-tx-card__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(22, 119, 255, 0.12);
  position: relative;
  z-index: 5;
  pointer-events: auto;
}

.admin-tx-card__ok {
  min-width: 96px;
  height: 36px;
  font-weight: 600;
  border-radius: 8px;
  pointer-events: auto;
  position: relative;
  z-index: 6;
}

.admin-tx-card__confirm {
  min-width: 110px;
  height: 36px;
  font-weight: 600;
  border-radius: 8px;
  background: #52c41a !important;
  border-color: #52c41a !important;
}

.admin-tx-card__reject {
  min-width: 96px;
  height: 36px;
  font-weight: 600;
  border-radius: 8px;
  color: #cf1322;
  border-color: #ffa39e;
}

.admin-withdraw-detail-overlay.is-open {
  display: flex;
}


.admin-dw-detail-internal-only .ant-modal-footer,
.admin-dw-detail-internal-only .ant-drawer-footer,
.admin-dw-detail-internal-only .ant-modal-close,
.admin-dw-detail-internal-only .ant-drawer-close {
  display: block !important;
  visibility: visible !important;
}

.admin-tx-card__chain-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px 16px;
}

.admin-tx-card__kv strong {
  font-size: 14px;
  color: #141414;
  font-weight: 600;
}

.admin-tx-card__kv code {
  font-size: 12px;
  background: #f5f5f5;
  padding: 2px 6px;
  border-radius: 4px;
  word-break: break-all;
}

.admin-tx-card__kv--amount strong {
  font-size: 18px;
  color: #1677ff;
}

.admin-tx-card__link {
  color: #1677ff;
  font-weight: 600;
  text-decoration: none;
}

.admin-tx-card__link:hover {
  text-decoration: underline;
}

.admin-deposit-type-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin: 0 0 14px;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid #eef0f3;
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.admin-auto-wd-panel {
  margin: 0 0 14px;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid #eef0f3;
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.admin-auto-wd-panel__title {
  font-size: 14px;
  font-weight: 700;
  color: #1f2329;
  margin-bottom: 10px;
}

.admin-auto-wd-panel__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
}

.admin-auto-wd-panel__toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  user-select: none;
}

.admin-auto-wd-panel__toggle input {
  width: 16px;
  height: 16px;
}

.admin-auto-wd-panel__max {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #475569;
  font-size: 13px;
}

.admin-auto-wd-panel__max input {
  width: 110px;
  height: 34px;
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  padding: 0 10px;
}

.admin-auto-wd-panel__save {
  height: 34px;
  padding: 0 14px;
  border: none;
  border-radius: 8px;
  background: #1677ff;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

.admin-auto-wd-panel__save:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.admin-auto-wd-panel__hint {
  font-size: 12px;
  color: #64748b;
}

.admin-auto-wd-panel__hint.is-ok {
  color: #059669;
}

.admin-auto-wd-panel__hint.is-err {
  color: #dc2626;
}

@media (max-width: 900px) {
  .admin-tx-card__flow {
    flex-direction: column;
  }
  .admin-tx-card__arrow {
    transform: rotate(90deg);
    justify-content: center;
  }
  .admin-tx-card__chain-grid {
    grid-template-columns: 1fr 1fr;
  }
  .admin-dw-header__legend {
    margin-left: 0;
    width: 100%;
  }
}

/* legacy tags kept for compatibility */
.admin-withdraw-page .admin-withdraw-detail-row td {
  background: #fafafa !important;
}

.admin-deposit-page .admin-deposit-detail-row td {
  background: #fafafa !important;
}

.admin-withdraw-detail,
.admin-deposit-detail {
  font-size: 12px;
  line-height: 1.5;
  color: #434343;
}

.admin-wd-tag {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  margin-right: 6px;
}

.admin-wd-tag.internal {
  background: #e6f4ff;
  color: #1677ff;
}

.admin-wd-tag.blockchain {
  background: #f6ffed;
  color: #389e0d;
}

.admin-wd-type-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  margin-right: 4px;
}

.admin-wd-type-badge.internal {
  background: #e6f4ff;
  color: #1677ff;
}

.admin-wd-type-badge.blockchain {
  background: #f6ffed;
  color: #389e0d;
}

.admin-withdraw-detail code {
  font-size: 11px;
  background: #f5f5f5;
  padding: 1px 4px;
  border-radius: 4px;
}

.admin-wd-status {
  color: #8c8c8c;
}

.admin-deposit-page .admin-deposit-detail-row td {
  background: #fffbe6 !important;
  border-top: none !important;
  padding: 6px 12px 10px !important;
}

.admin-deposit-detail {
  font-size: 12px;
  line-height: 1.5;
  color: #434343;
}

.admin-internal-transfer__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px 16px;
  margin-top: 8px;
}

.admin-internal-transfer__item em {
  display: block;
  font-size: 11px;
  color: #8c8c8c;
  font-style: normal;
  margin-bottom: 2px;
}

.admin-internal-transfer__item strong {
  font-size: 13px;
  color: #141414;
  font-weight: 600;
}

.admin-internal-transfer__note,
.admin-internal-transfer__status {
  margin-top: 6px;
  font-size: 11px;
}

.admin-tx-party-cell {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.admin-tx-party-cell--send {
  background: #fff7e6;
  color: #d46b08;
  border: 1px solid #ffd591;
}

.admin-tx-party-cell--recv {
  background: #f6ffed;
  color: #389e0d;
  border: 1px solid #b7eb8f;
}

.admin-tx-party-cell--ref {
  background: #f5f5f5;
  color: #595959;
  border: 1px solid #e8e8e8;
  font-weight: 500;
  font-size: 12px;
}

.admin-tx-ref-empty {
  color: #bfbfbf;
}

.admin-deposit-page .ant-table-thead th,
.admin-withdraw-page .ant-table-thead th {
  font-weight: 700 !important;
  font-size: 12px !important;
  white-space: nowrap;
}

.admin-internal-inline {
  font-size: 12px;
  color: #434343;
}

@media (max-width: 900px) {
  .admin-internal-transfer__grid {
    grid-template-columns: 1fr 1fr;
  }
}

.admin-deposit-type-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin: 0 0 12px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.admin-deposit-type-filter--inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid #eef0f3;
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  vertical-align: middle;
}

.admin-deposit-type-filter__label {
  font-size: 13px;
  font-weight: 600;
  color: #434343;
}

.admin-deposit-type-filter__hint {
  font-size: 12px;
  font-weight: 400;
  color: #8c8c8c;
}

.admin-deposit-type-filter__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.admin-deposit-type-filter__btn {
  border: 1px solid #d9d9d9;
  background: #fafafa;
  color: #434343;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 12px;
  cursor: pointer;
}

.admin-deposit-type-filter__btn.is-active {
  background: #1677ff;
  border-color: #1677ff;
  color: #fff;
}

.admin-deposit-type-filter__btn[data-type='INTERNAL'].is-active {
  background: #1677ff;
  border-color: #1677ff;
}

.admin-deposit-type-filter__sender {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-left: auto;
}

.admin-deposit-type-filter__input {
  min-width: 220px;
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 12px;
}

.admin-deposit-type-filter__search,
.admin-deposit-type-filter__clear {
  border: 1px solid #d9d9d9;
  background: #fff;
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 12px;
  cursor: pointer;
}

.admin-deposit-type-filter__search {
  background: #1677ff;
  border-color: #1677ff;
  color: #fff;
}

.admin-deposit-manage .admin-deposit-type-filter,
.deposit-page #admin-deposit-manage-filter {
  margin: 0 0 14px;
  width: 100%;
  box-sizing: border-box;
}

.deposit-page .customer-card-compact,
.deposit-page .customer-id-primary,
.deposit-page .customer-nickname-primary {
  cursor: pointer;
}

.deposit-page .customer-card-compact:hover,
.deposit-page .customer-id-primary:hover {
  color: #1677ff;
}

/* ══ Dashboard v4 — clean readable UI ══ */
.adm-dash {
  padding: 0 4px 32px;
  max-width: 1480px;
  margin: 0 auto;
  font-family: Inter, 'Segoe UI', system-ui, sans-serif;
  color: #141414;
}
.adm-dash h2.adm-section__title {
  color: #141414 !important;
}

/* Hero header */
.adm-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
  padding: 24px 28px;
  border-radius: 16px;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 55%, #1677ff 120%);
  color: #fff;
  box-shadow: 0 8px 32px rgba(15, 23, 42, 0.18);
}
.adm-dash .adm-hero__title,
.adm-hero h1.adm-hero__title {
  margin: 0 0 8px;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: #ffffff !important;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}
.adm-dash .adm-hero__sub,
.adm-hero p.adm-hero__sub {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.92) !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}
.adm-hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.adm-hero-stat {
  min-width: 130px;
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(4px);
}
.adm-hero-stat span {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.88) !important;
  margin-bottom: 4px;
}
.adm-hero-stat strong {
  font-size: 18px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #ffffff !important;
}
.adm-hero-stat--accent {
  background: rgba(82, 196, 26, 0.28);
  border-color: rgba(82, 196, 26, 0.55);
}
.adm-hero-stat--accent span {
  color: rgba(255, 255, 255, 0.95) !important;
}
.adm-hero-stat--accent strong {
  color: #b7ff8a !important;
}
.adm-hero-stat--warn {
  background: rgba(255, 77, 79, 0.22);
  border-color: rgba(255, 77, 79, 0.45);
}
.adm-hero-stat--warn strong {
  color: #ffb3b3 !important;
}
.adm-hero-stat--muted {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
}
.adm-hero-stat small {
  display: block;
  margin-top: 4px;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.75) !important;
}

/* Sections */
.adm-section {
  margin-bottom: 28px;
}
.adm-section__head {
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e8e8e8;
}
.adm-section__title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #141414 !important;
}
.adm-section__desc {
  margin: 4px 0 0;
  font-size: 12px;
  color: #595959 !important;
}

/* KPI grid */
.adm-grid {
  display: grid;
  gap: 14px;
}
.adm-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.adm-grid--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.adm-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.adm-kpi {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  background: #fff;
  border-radius: 14px;
  border: 1px solid #eef0f3;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: box-shadow 0.2s, transform 0.2s;
  min-height: 96px;
}
.adm-kpi:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.07);
  transform: translateY(-1px);
}
.adm-kpi__text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.adm-kpi__label {
  font-size: 12px;
  font-weight: 600;
  color: #595959 !important;
  line-height: 1.3;
}
.adm-kpi__value {
  font-size: 22px;
  font-weight: 700;
  color: #0a0a0a !important;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  word-break: break-all;
}
.adm-kpi__hint {
  font-size: 11px;
  color: #737373 !important;
}
.adm-kpi__hint--stack {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin-top: 2px;
  line-height: 1.35;
}
.adm-kpi__hint-line {
  display: block;
  font-size: 11px;
  color: #737373 !important;
  white-space: nowrap;
}
.adm-kpi__icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  border-radius: 12px;
}

/* Accent colors */
.adm-kpi--green { border-left: 4px solid #52c41a; }
.adm-kpi--green .adm-kpi__icon { background: #f6ffed; }
.adm-kpi--blue { border-left: 4px solid #1677ff; }
.adm-kpi--blue .adm-kpi__icon { background: #e6f4ff; }
.adm-kpi--gold { border-left: 4px solid #faad14; }
.adm-kpi--gold .adm-kpi__icon { background: #fffbe6; }
.adm-kpi--red { border-left: 4px solid #ff4d4f; }
.adm-kpi--red .adm-kpi__icon { background: #fff2f0; }
.adm-kpi--teal { border-left: 4px solid #13c2c2; }
.adm-kpi--teal .adm-kpi__icon { background: #e6fffb; }
.adm-kpi--indigo { border-left: 4px solid #2f54eb; }
.adm-kpi--indigo .adm-kpi__icon { background: #f0f5ff; }
.adm-kpi--purple { border-left: 4px solid #722ed1; }
.adm-kpi--purple .adm-kpi__icon { background: #f9f0ff; }
.adm-kpi--cyan { border-left: 4px solid #08979c; }
.adm-kpi--cyan .adm-kpi__icon { background: #e6fffb; }
.adm-kpi--navy { border-left: 4px solid #434343; }
.adm-kpi--navy .adm-kpi__icon { background: #fafafa; }
.adm-kpi--slate { border-left: 4px solid #595959; }
.adm-kpi--slate .adm-kpi__icon { background: #f5f5f5; }

/* Charts area */
.adm-charts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}
.adm-panel {
  background: #fff;
  border: 1px solid #eef0f3;
  border-radius: 14px;
  padding: 18px 20px 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.adm-panel__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
  flex-shrink: 0;
}
.adm-panel__head strong {
  display: block;
  font-size: 14px;
  color: #141414 !important;
}
.adm-panel__head small {
  display: block;
  font-size: 11px;
  color: #595959 !important;
  margin-top: 2px;
  font-weight: 400;
}
.adm-select {
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12px;
  background: #fafafa;
  cursor: pointer;
  color: #434343;
  flex-shrink: 0;
}
.adm-select:hover { border-color: #1677ff; }
.adm-chart {
  width: 100%;
  height: 280px;
  max-height: 280px;
  min-height: 280px;
  overflow: hidden;
  flex: none;
}

.adm-chart .amcharts-main-div,
.adm-chart > div {
  max-height: 280px !important;
}

/* Volume panel */
.adm-vol-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 12px;
}
.adm-vol-filter label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: #595959;
  font-weight: 500;
}
.adm-vol-filter input {
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  padding: 8px 10px;
  min-width: 120px;
  font-size: 13px;
  background: #fafafa;
}
.adm-vol-filter input:focus {
  outline: none;
  border-color: #1677ff;
  box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.12);
}
.adm-btn {
  align-self: flex-end;
  background: #1677ff;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.adm-btn:hover { background: #4096ff; }
.adm-vol-sum {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 12px;
  padding: 12px 14px;
  background: #f6f8fa;
  border-radius: 10px;
}
.adm-vol-sum__item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.adm-vol-sum__item em {
  font-style: normal;
  font-size: 11px;
  color: #595959 !important;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.adm-vol-sum__item strong {
  font-size: 16px;
  color: #0a0a0a !important;
  font-variant-numeric: tabular-nums;
}
.adm-table-wrap {
  flex: 1;
  overflow: auto;
  max-height: 200px;
  border: 1px solid #f0f0f0;
  border-radius: 8px;
}
.adm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.adm-table thead {
  position: sticky;
  top: 0;
  background: #fafafa;
  z-index: 1;
}
.adm-table th,
.adm-table td {
  padding: 8px 12px;
  text-align: left;
  border-bottom: 1px solid #f0f0f0;
}
.adm-table th {
  color: #8c8c8c;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.adm-table tbody tr:hover { background: #fafafa; }
.adm-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

/* States */
.adm-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  gap: 12px;
  color: #8c8c8c;
  font-size: 14px;
}
.adm-state--error { color: #ff4d4f; }
.adm-state__icon { font-size: 32px; }
.adm-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid #e8e8e8;
  border-top-color: #1677ff;
  border-radius: 50%;
  animation: adm-spin 0.8s linear infinite;
}
@keyframes adm-spin { to { transform: rotate(360deg); } }
.adm-empty {
  padding: 24px;
  text-align: center;
  color: #bfbfbf;
  font-size: 13px;
}

/* Responsive */
@media (max-width: 1200px) {
  .adm-grid--4,
  .adm-grid--5,
  .adm-charts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .adm-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
  .adm-hero { padding: 18px; }
  .adm-dash .adm-hero__title,
  .adm-hero h1.adm-hero__title { font-size: 24px; }
  .adm-hero__stats { width: 100%; }
  .adm-hero-stat { flex: 1; min-width: calc(50% - 8px); }
  .adm-grid--4,
  .adm-grid--5,
  .adm-grid--3,
  .adm-charts { grid-template-columns: 1fr; }
  .adm-kpi__value { font-size: 18px; }
}

/* ══ Game Control Center ══ */
.gm-root {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0 8px 40px;
  font-family: Inter, 'Segoe UI', system-ui, sans-serif;
}

.gm-panel--live {
  width: 100%;
}

.admin-route-overlay .gm-panel--live {
  min-height: calc(100vh - 100px);
}
.gm-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 320px;
  gap: 12px;
  color: #8c8c8c;
}
.gm-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid #e8e8e8;
  border-top-color: #1677ff;
  border-radius: 50%;
  animation: adm-spin 0.8s linear infinite;
}
.gm-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  padding: 22px 26px;
  margin-bottom: 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  color: #fff;
  box-shadow: 0 8px 28px rgba(15, 52, 96, 0.25);
}
.gm-head__title {
  margin: 0 0 6px;
  font-size: 28px;
  font-weight: 800;
  color: #fff !important;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}
.gm-head__sub {
  margin: 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.9) !important;
}
.gm-head__right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.gm-countdown {
  text-align: center;
  min-width: 72px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.gm-countdown__num {
  display: block;
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
  color: #fff !important;
  font-variant-numeric: tabular-nums;
}
.gm-countdown__lbl {
  font-size: 10px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75) !important;
}
.gm-phase {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.gm-phase--bet { background: #52c41a; color: #fff; }
.gm-phase--sim { background: #faad14; color: #141414; }
.gm-phase--fin { background: #ff4d4f; color: #fff; }
.gm-phase--res { background: #1677ff; color: #fff; }

.gm-pred {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  margin-bottom: 14px;
  border-radius: 12px;
  border: 1px solid #eef0f3;
  background: #fff;
}
.gm-pred__label {
  font-size: 11px;
  text-transform: uppercase;
  color: #8c8c8c;
  font-weight: 600;
}
.gm-pred strong { font-size: 15px; color: #141414; }
.gm-pred--manual { border-left: 4px solid #722ed1; background: #f9f0ff; }
.gm-pred--engine { border-left: 4px solid #1677ff; background: #e6f4ff; }
.gm-pred--random { border-left: 4px solid #bfbfbf; }
.gm-pred__live { font-size: 12px; color: #595959; margin-left: auto; }

.gm-bar {
  display: flex;
  height: 52px;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 16px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}
.gm-bar__buy,
.gm-bar__sell {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  transition: width 0.4s ease;
}
.gm-bar__buy { background: linear-gradient(90deg, #389e0d, #52c41a); }
.gm-bar__sell { background: linear-gradient(90deg, #cf1322, #ff4d4f); }

.gm-preview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.gm-preview__card--daily {
  border-color: #91caff;
  background: #f0f7ff;
}
.gm-kpi-hint {
  display: block;
  margin-top: 4px;
  font-size: 10px;
  color: #8c8c8c;
  font-weight: 400;
  line-height: 1.3;
}
.gm-preview__card {
  padding: 14px 16px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #eef0f3;
}
.gm-preview__card span {
  display: block;
  font-size: 11px;
  color: #8c8c8c;
  margin-bottom: 4px;
  text-transform: uppercase;
}
.gm-preview__card strong { font-size: 22px; font-variant-numeric: tabular-nums; }
.gm-preview__card--best {
  border-color: #52c41a;
  box-shadow: 0 0 0 2px rgba(82, 196, 26, 0.15);
}
.gm-preview__card--muted { background: #fafafa; }
.gm-pos { color: #389e0d !important; }
.gm-neg { color: #cf1322 !important; }

.gm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}
.gm-btn {
  border: none;
  border-radius: 10px;
  padding: 12px 22px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s, opacity 0.15s;
}
.gm-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.gm-btn:not(:disabled):hover { transform: translateY(-1px); }
.gm-btn--buy { background: linear-gradient(135deg, #389e0d, #52c41a); color: #fff; flex: 1; min-width: 140px; font-size: 15px; padding: 14px 24px; }
.gm-btn--sell { background: linear-gradient(135deg, #cf1322, #ff4d4f); color: #fff; flex: 1; min-width: 140px; font-size: 15px; padding: 14px 24px; }
.gm-btn--ghost { background: #fff; color: #434343; border: 1px solid #d9d9d9; }

.gm-break-hint {
  margin: -8px 0 14px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fffbe6;
  border: 1px solid #ffe58f;
  font-size: 13px;
  color: #614700;
  line-height: 1.45;
}
.gm-break-hint--muted {
  background: #fafafa;
  border-color: #e8e8e8;
  color: #8c8c8c;
}

.gm-ohlc {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.gm-ohlc div {
  padding: 12px;
  border-radius: 10px;
  background: #f6f8fa;
  border: 1px solid #eef0f3;
}
.gm-ohlc em {
  display: block;
  font-style: normal;
  font-size: 10px;
  text-transform: uppercase;
  color: #8c8c8c;
  margin-bottom: 4px;
}
.gm-ohlc strong { font-size: 14px; color: #141414; font-variant-numeric: tabular-nums; }

.gm-table-wrap {
  border: 1px solid #eef0f3;
  border-radius: 12px;
  overflow: auto;
  max-height: 280px;
  margin-bottom: 20px;
  background: #fff;
}
.gm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.gm-table thead { position: sticky; top: 0; background: #fafafa; z-index: 1; }
.gm-table th,
.gm-table td { padding: 10px 12px; border-bottom: 1px solid #f0f0f0; text-align: left; }
.gm-table th { font-size: 11px; text-transform: uppercase; color: #8c8c8c; }
.gm-num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.gm-dim { color: #8c8c8c; font-weight: 400; }

.gm-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
}
.gm-tag--buy { background: #f6ffed; color: #389e0d; }
.gm-tag--sell { background: #fff2f0; color: #cf1322; }
.gm-tag--mix { background: #f5f5f5; color: #595959; }
.gm-tag--mkt { background: #fff7e6; color: #d46b08; font-size: 10px; margin-left: 4px; }
.gm-tag--demo { background: #e6f4ff; color: #0958d9; font-size: 10px; margin-left: 4px; }
.gm-tag--real { background: #f6ffed; color: #389e0d; font-size: 10px; }

.gm-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  padding: 12px 18px;
  margin-bottom: 18px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #eef0f3;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.gm-toolbar__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.gm-toolbar__hint {
  margin: 0;
  font-size: 12px;
  color: #8c8c8c;
}

.gm-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: #f5f7fa;
  border: 1px solid #e8e8e8;
  font-size: 13px;
  font-weight: 600;
  color: #434343;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s, border-color 0.15s;
}

.gm-filter-chip:has(input:checked) {
  background: #e6f4ff;
  border-color: #91caff;
  color: #0958d9;
}

.gm-filter-chip input {
  cursor: pointer;
  width: 16px;
  height: 16px;
}

.gm-live-grid {
  display: grid;
  grid-template-columns: minmax(380px, 1fr) minmax(420px, 1.15fr);
  gap: 20px;
  align-items: start;
}

.gm-live-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 20px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #eef0f3;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

.gm-live-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 100%;
}

.gm-side-card {
  padding: 16px 18px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #eef0f3;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 280px;
}

.gm-side-card__title {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 700;
  color: #141414;
}

.gm-table-wrap--tall {
  flex: 1;
  max-height: none;
  min-height: 220px;
  max-height: 360px;
}

.gm-filter-mkt {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #434343;
  padding: 6px 10px;
  border-radius: 8px;
  background: #fafafa;
  border: 1px solid #e8e8e8;
  cursor: pointer;
  user-select: none;
}
.gm-filter-mkt input { cursor: pointer; }

.gm-user {
  display: flex;
  flex-direction: column;
  gap: 1px;
  line-height: 1.3;
}
.gm-user__name {
  font-size: 13px;
  font-weight: 700;
  color: #141414;
}
.gm-user__nick {
  font-size: 11px;
  color: #595959;
}
.gm-user__id {
  font-size: 11px;
  color: #8c8c8c;
}

.gm-orders {
  margin-top: 16px;
}
.gm-orders__title {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 700;
  color: #141414;
}

.gm-config {
  padding: 18px 20px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #eef0f3;
}
.gm-config h3 {
  margin: 0 0 12px;
  font-size: 15px;
  color: #141414 !important;
}
.gm-config__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr auto;
  gap: 12px;
  align-items: end;
}
.gm-config label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: #595959;
  font-weight: 500;
}
.gm-config select,
.gm-config input {
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 13px;
}
.gm-empty {
  text-align: center;
  color: #bfbfbf;
  padding: 20px;
}

.gm-pred--auto_break {
  background: linear-gradient(90deg, #fff7e6 0%, #fff1f0 100%);
  border-color: #ffd591;
}

.gm-autobreak {
  padding: 18px 20px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #ffd591;
  margin-bottom: 20px;
}
.gm-autobreak__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.gm-autobreak__head h3 {
  margin: 0;
  font-size: 15px;
  color: #141414 !important;
}
.gm-ab-status {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.gm-ab-status--on { background: #f6ffed; color: #389e0d; }
.gm-ab-status--off { background: #f5f5f5; color: #8c8c8c; }
.gm-ab-status--alert { background: #fff2f0; color: #cf1322; }
.gm-ab-status--wait { background: #fff7e6; color: #d46b08; }
.gm-autobreak__kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}
.gm-autobreak__kpi {
  padding: 12px;
  border-radius: 10px;
  background: #fafafa;
  border: 1px solid #f0f0f0;
}
.gm-autobreak__kpi em {
  display: block;
  font-size: 11px;
  color: #8c8c8c;
  margin-bottom: 4px;
  font-style: normal;
}
.gm-autobreak__kpi strong {
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}
.gm-autobreak__cfg {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 8px;
}
.gm-ab-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #141414;
  padding-bottom: 8px;
}
.gm-ab-hint {
  margin: 0 0 12px;
  font-size: 11px;
  color: #8c8c8c;
  line-height: 1.5;
}
.gm-table-wrap--logs { max-height: 200px; margin-bottom: 0; }

@media (max-width: 1100px) {
  .gm-live-grid { grid-template-columns: 1fr; }
  .gm-table-wrap--tall { max-height: 280px; }
}

@media (max-width: 900px) {
  .gm-autobreak__kpis { grid-template-columns: 1fr 1fr; }
  .gm-autobreak__cfg { grid-template-columns: 1fr; }
  .gm-preview,
  .gm-ohlc { grid-template-columns: 1fr 1fr; }
  .gm-config__grid { grid-template-columns: 1fr; }
  .gm-head__title { font-size: 22px; }
  .gm-toolbar { flex-direction: column; align-items: flex-start; }
}

/* Customer list — ID links to detail */
a.admin-customer-id-link {
  color: var(--admin-primary, #1677ff);
  font-weight: 600;
  text-decoration: none;
}
a.admin-customer-id-link:hover {
  color: var(--admin-primary-hover, #4096ff);
  text-decoration: underline;
}

/* Customer list — username + row actions */
.admin-customer-username-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.35;
}
.admin-customer-username-link,
.admin-customer-username-cell .admin-customer-username {
  font-weight: 600;
  font-size: 13px;
  color: #1677ff;
  text-decoration: none;
}
.admin-customer-username-link:hover {
  text-decoration: underline;
}
.admin-customer-user-meta {
  font-size: 11px;
  color: #8c8c8c;
}

.admin-kyc-tick {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #52c41a;
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  line-height: 1;
  box-shadow: 0 1px 4px rgba(82, 196, 26, 0.35);
}
.admin-mkt-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.admin-mkt-badge--yes {
  background: #fff7e6;
  color: #d46b08;
  border: 1px solid #ffd591;
}
.admin-mkt-badge--no {
  background: #f5f5f5;
  color: #8c8c8c;
  border: 1px solid #e8e8e8;
}

body.admin-customer-list-page td[data-admin-hide-avatar],
body.admin-customer-list-page th[data-admin-hide-avatar] {
  display: none !important;
}

.admin-kyc-empty {
  color: #d9d9d9;
  font-size: 14px;
}
.admin-customer-list-page .ant-table-tbody td[data-admin-customer-kyc] {
  text-align: center;
}
.admin-customer-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.admin-customer-act {
  border: 1px solid #d9d9d9;
  background: #fff;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
  line-height: 1.4;
  white-space: nowrap;
}
.admin-customer-act:hover {
  border-color: #1677ff;
  color: #1677ff;
}
.admin-customer-act--credit {
  border-color: #91caff;
  background: #e6f4ff;
  color: #0958d9;
  font-weight: 600;
}
.admin-customer-act--debit {
  border-color: #ffa39e;
  background: #fff1f0;
  color: #cf1322;
  font-weight: 600;
}
.admin-customer-ops-btn--danger {
  border: 1px solid #ff4d4f;
  background: #ff4d4f;
  color: #fff;
}
.admin-customer-ops-btn--danger:hover {
  background: #cf1322;
  border-color: #cf1322;
}
.admin-customer-act--pw {
  border-color: #ffd591;
  background: #fff7e6;
  color: #d46b08;
}
.admin-customer-actions-host {
  margin-bottom: 4px;
}

/* Customer detail — thanh Tạo/Xoá 2FA */
#admin-2fa-detail-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0 0 16px;
  padding: 12px 16px;
  background: #fff;
  border: 1px solid #f0f0f0;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}
#admin-2fa-detail-bar .admin-2fa-detail-label {
  color: #595959;
  font-weight: 600;
}
#admin-2fa-detail-bar .admin-2fa-status {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 13px;
}
#admin-2fa-detail-bar .admin-2fa-status--on {
  background: #e6fffb;
  color: #08979c;
  border: 1px solid #87e8de;
}
#admin-2fa-detail-bar .admin-2fa-status--off {
  background: #fafafa;
  color: #8c8c8c;
  border: 1px solid #d9d9d9;
}
#admin-2fa-detail-bar .admin-2fa-status--loading {
  background: #f5f5f5;
  color: #bfbfbf;
}
#admin-2fa-detail-bar .admin-2fa-detail-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
#admin-2fa-detail-bar .admin-customer-ops-btn--danger[disabled],
#admin-2fa-detail-bar .admin-customer-ops-btn--primary[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}
.admin-create2fa-box {
  margin: 10px 0 14px;
  padding: 12px;
  border: 1px dashed #d9d9d9;
  border-radius: 8px;
  background: #fafafa;
  text-align: center;
}
.admin-create2fa-loading {
  color: #8c8c8c;
  font-size: 13px;
  padding: 18px 8px;
}
.admin-create2fa-qr {
  width: 168px;
  height: 168px;
  background: #fff;
  border: 1px solid #f0f0f0;
  border-radius: 8px;
}
.admin-create2fa-secretwrap {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
}
.admin-create2fa-secretlabel {
  font-size: 12px;
  color: #8c8c8c;
  font-weight: 600;
}
.admin-create2fa-secret {
  display: block;
  max-width: 100%;
  padding: 8px 10px;
  background: #fff;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  font-size: 13px;
  word-break: break-all;
  user-select: all;
}
.admin-create2fa-copy {
  margin-top: 2px;
}

.admin-customer-ops-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10050;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.admin-customer-ops-overlay.is-open {
  display: flex;
}
.admin-customer-ops-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}
.admin-customer-ops-dialog {
  position: relative;
  width: min(440px, 100%);
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
  overflow: hidden;
}
.admin-customer-ops-dialog__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid #f0f0f0;
}
.admin-customer-ops-dialog__head h3 {
  margin: 0;
  font-size: 16px;
}
.admin-customer-ops-close {
  border: none;
  background: transparent;
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
  color: #8c8c8c;
}
.admin-customer-ops-dialog__body {
  padding: 16px;
}
.admin-customer-ops-dialog__foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid #f0f0f0;
}
.admin-customer-ops-hint {
  margin: 0 0 12px;
  font-size: 13px;
  color: #434343;
}
.admin-customer-ops-sub {
  margin: 0 0 12px;
  font-size: 12px;
  color: #8c8c8c;
}
.admin-customer-ops-label {
  display: block;
  margin: 10px 0 6px;
  font-size: 12px;
  font-weight: 600;
  color: #595959;
}
.admin-customer-ops-input {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  font-size: 14px;
}
.admin-customer-ops-textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  font-size: 14px;
  resize: vertical;
  min-height: 72px;
  font-family: inherit;
}
.admin-customer-ops-req {
  color: #cf1322;
}
.admin-customer-ops-captcha {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.admin-customer-ops-captcha-img {
  height: 40px;
  border: 1px solid #f0f0f0;
  border-radius: 4px;
  background: #fff;
}
.admin-customer-ops-captcha-refresh {
  font-size: 12px;
  padding: 6px 10px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  background: #fafafa;
  cursor: pointer;
}
.admin-customer-ops-password-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: #fafafa;
  border: 1px solid #f0f0f0;
  border-radius: 8px;
  font-size: 15px;
}
.admin-customer-ops-password-box.is-loading {
  color: #8c8c8c;
}
.admin-customer-ops-password-box.is-error {
  color: #cf1322;
  background: #fff2f0;
  border-color: #ffccc7;
}
.admin-customer-ops-pw {
  flex: 1;
  font-family: ui-monospace, monospace;
  word-break: break-all;
}
.admin-customer-ops-copy {
  flex-shrink: 0;
  padding: 6px 12px;
  border: 1px solid #1677ff;
  background: #1677ff;
  color: #fff;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
}
.admin-customer-ops-btn {
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  border: 1px solid #d9d9d9;
  background: #fff;
}
.admin-customer-ops-btn--primary {
  background: #1677ff;
  border-color: #1677ff;
  color: #fff;
}
.admin-customer-ops-msg {
  margin: 10px 0 0;
  font-size: 12px;
}
.admin-customer-ops-msg.is-ok {
  color: #389e0d;
}
.admin-customer-ops-msg.is-error {
  color: #cf1322;
}

/* ══ Telegram Bot manager ══ */
.admin-tgbot-navitem {
  cursor: pointer;
}
.admin-tgbot-navitem .admin-tgbot-navlabel {
  font-weight: 600;
}
.admin-tgbot-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: none;
}
.admin-tgbot-overlay.is-open {
  display: block;
}
.admin-tgbot-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}
.admin-tgbot-dialog {
  position: absolute;
  top: 2vh;
  left: 50%;
  transform: translateX(-50%);
  width: min(1380px, 98vw);
  max-height: 96vh;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}
.admin-tgbot-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-bottom: 1px solid #f0f0f0;
}
.admin-tgbot-head h3 {
  margin: 0;
  font-size: 17px;
}
.admin-tgbot-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-bottom: 1px solid #f0f0f0;
  background: #fafafa;
}
.admin-tgbot-nickwrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #555;
}
.admin-tgbot-nick {
  width: 140px;
}
.admin-tgbot-btn {
  border: 1px solid #d9d9d9;
  background: #fff;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
}
.admin-tgbot-btn--seed {
  background: #1677ff;
  border-color: #1677ff;
  color: #fff;
}
.admin-tgbot-btn--seed:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.admin-tgbot-btn--ok {
  background: #389e0d;
  border-color: #389e0d;
  color: #fff;
}
.admin-tgbot-status {
  font-size: 12.5px;
  color: #666;
  margin-left: 4px;
}
.admin-tgbot-status.is-ok {
  color: #389e0d;
}
.admin-tgbot-status.is-error {
  color: #cf1322;
}
.admin-tgbot-bulk {
  padding: 10px 18px 12px;
  border-bottom: 1px solid #f0f0f0;
  background: #fffbe6;
}
.admin-tgbot-bulk-hint {
  font-size: 12px;
  color: #666;
  margin-bottom: 6px;
}
.admin-tgbot-bulk-ta {
  width: 100%;
  box-sizing: border-box;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  padding: 8px;
  resize: vertical;
}
.admin-tgbot-bulk-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.admin-tgbot-close {
  border: none;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: #888;
}
.admin-tgbot-body {
  padding: 12px 18px 18px;
  overflow: auto;
}
.admin-tgbot-loading,
.admin-tgbot-empty {
  padding: 30px;
  text-align: center;
  color: #888;
}
.admin-tgbot-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
.admin-tgbot-table th,
.admin-tgbot-table td {
  border: 1px solid #f0f0f0;
  padding: 6px 8px;
  text-align: left;
  vertical-align: middle;
}
.admin-tgbot-table th {
  background: #fafafa;
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 1;
}
.admin-tgbot-pkg {
  color: #08979c;
  font-weight: 600;
  white-space: nowrap;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.admin-tgbot-nickcell {
  color: #666;
  white-space: nowrap;
}
.admin-tgbot-in {
  width: 100%;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  padding: 4px 6px;
  font-size: 12.5px;
  box-sizing: border-box;
}
.admin-tgbot-in:focus {
  border-color: #1677ff;
  outline: none;
}
.admin-tgbot-save {
  border: 1px solid #1677ff;
  background: #1677ff;
  color: #fff;
  padding: 4px 10px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 12px;
}
.admin-tgbot-rowmsg {
  margin-left: 6px;
  font-size: 11.5px;
}
.admin-tgbot-rowmsg.is-ok {
  color: #389e0d;
}
.admin-tgbot-rowmsg.is-error {
  color: #cf1322;
}

/* ══ Branch stats (Thống kê nhánh) ══ */
.admin-bstat-navitem {
  cursor: pointer;
}
.admin-bstat-navitem .admin-bstat-navlabel {
  font-weight: 600;
}
.admin-bstat-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: none;
}
.admin-bstat-overlay.is-open {
  display: block;
}
.admin-bstat-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}
.admin-bstat-dialog {
  position: absolute;
  top: 2vh;
  left: 50%;
  transform: translateX(-50%);
  width: min(1440px, 98vw);
  max-height: 96vh;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}
.admin-bstat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-bottom: 1px solid #f0f0f0;
}
.admin-bstat-head h3 {
  margin: 0;
  font-size: 17px;
}
.admin-bstat-close {
  border: none;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: #888;
}
.admin-bstat-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 18px;
  border-bottom: 1px solid #f0f0f0;
  background: #fafafa;
}
.admin-bstat-userbox {
  position: relative;
  min-width: 260px;
  flex: 1 1 280px;
}
.admin-bstat-in {
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  padding: 5px 8px;
  font-size: 13px;
}
.admin-bstat-date {
  width: 140px;
}
.admin-bstat-suggest {
  position: absolute;
  z-index: 5;
  left: 0;
  right: 0;
  top: 58px;
  max-height: 240px;
  overflow: auto;
  background: #fff;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}
.admin-bstat-suggest-item {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: #fff;
  padding: 8px 10px;
  cursor: pointer;
  border-bottom: 1px solid #f5f5f5;
  font-size: 12.5px;
}
.admin-bstat-suggest-item:hover {
  background: #e6f4ff;
}
.admin-bstat-suggest-item span {
  color: #1677ff;
  margin-left: 4px;
}
.admin-bstat-suggest-item em {
  color: #888;
  font-style: normal;
  margin-left: 6px;
}
.admin-bstat-suggest-empty {
  padding: 10px;
  color: #888;
  font-size: 12.5px;
}
.admin-bstat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.admin-bstat-chips-hint {
  color: #999;
  font-size: 12px;
}
.admin-bstat-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #e6f4ff;
  color: #0958d9;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 600;
}
.admin-bstat-chip button {
  border: 0;
  background: transparent;
  cursor: pointer;
  color: #0958d9;
  font-size: 14px;
  line-height: 1;
  padding: 0 2px;
}
.admin-bstat-btn {
  border: 1px solid #d9d9d9;
  background: #fff;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
}
.admin-bstat-btn--primary {
  background: #1677ff;
  border-color: #1677ff;
  color: #fff;
}
.admin-bstat-btn--ok {
  background: #389e0d;
  border-color: #389e0d;
  color: #fff;
}
.admin-bstat-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.admin-bstat-status {
  font-size: 12.5px;
  color: #666;
  align-self: center;
}
.admin-bstat-status.is-ok {
  color: #389e0d;
}
.admin-bstat-status.is-error {
  color: #cf1322;
}
.admin-bstat-metrics {
  padding: 10px 18px;
  border-bottom: 1px solid #f0f0f0;
  background: #fffbe6;
}
.admin-bstat-metrics-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}
.admin-bstat-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 6px 12px;
}
.admin-bstat-metric {
  font-size: 12.5px;
  display: flex;
  align-items: flex-start;
  gap: 6px;
  cursor: pointer;
}
.admin-bstat-extra {
  color: #d48806;
  font-style: normal;
  font-size: 11px;
}
.admin-bstat-body {
  padding: 12px 18px 18px;
  overflow: auto;
  flex: 1;
}
.admin-bstat-loading,
.admin-bstat-empty {
  padding: 30px;
  text-align: center;
  color: #888;
}
.admin-bstat-meta {
  font-size: 12.5px;
  color: #666;
  margin-bottom: 10px;
}
.admin-bstat-tablewrap {
  overflow: auto;
}
.admin-bstat-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
.admin-bstat-table th,
.admin-bstat-table td {
  border: 1px solid #f0f0f0;
  padding: 6px 8px;
  text-align: right;
  white-space: nowrap;
}
.admin-bstat-table th {
  background: #1f4e79;
  color: #fff;
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 1;
  text-align: center;
}
.admin-bstat-nick {
  text-align: left !important;
  font-weight: 600;
  color: #08979c;
}
.admin-bstat-num.is-neg {
  color: #cf1322;
}
.admin-bstat-total td {
  background: #e6f4ff;
  font-weight: 700;
}



