/* Exchange-style bottom sheets, payment overlay & trade modals */

.ax-pay-sheet {
  position: fixed;
  inset: 0;
  z-index: 480;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
}
.ax-pay-sheet:not(.hidden) { pointer-events: auto; }
body.ax-pay-open { overflow: hidden; }

.ax-pay-scrim {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  opacity: 0;
  transition: opacity 0.28s ease;
}
.ax-pay-sheet:not(.hidden) .ax-pay-scrim { opacity: 1; }

.ax-pay-panel {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: min(92vh, 780px);
  overflow-x: hidden;
  overflow-y: auto;
  background: #12161c;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px 20px 0 0;
  transform: translateY(100%);
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  padding: 0 0 calc(18px + env(safe-area-inset-bottom));
  box-shadow: 0 -24px 48px rgba(0, 0, 0, 0.45);
  box-sizing: border-box;
}
.ax-pay-sheet:not(.hidden) .ax-pay-panel { transform: translateY(0); }

.ax-pay-toolbar {
  position: relative;
  flex-shrink: 0;
  padding: calc(16px + env(safe-area-inset-top, 0px)) 16px 10px;
  box-sizing: border-box;
}

.ax-pay-handle {
  width: 36px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  margin: 0 auto 14px;
}

.ax-pay-panel .ax-pay-close.modal-close-btn {
  position: absolute;
  top: calc(16px + env(safe-area-inset-top, 0px));
  right: 16px;
  width: 34px;
  height: 34px;
  margin: 0;
  padding: 0;
  border-radius: 10px;
  z-index: 6;
}

.ax-pay-content {
  padding: 6px 20px 12px;
  box-sizing: border-box;
}

.ax-pay-panel .deposit-card,
.ax-pay-panel .withdraw-card,
.ax-dep-sheet,
.ax-wd-sheet {
  margin: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
  opacity: 1 !important;
  transform: none !important;
  visibility: visible !important;
  animation: none !important;
}

/* Legacy aliases — unified styles below in .ax-pay-* block */

.ax-dep-sheet .btn-main,
.ax-dep-sheet .btn-ghost,
.ax-dep-sheet .btn-support {
  margin-top: 10px;
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  box-sizing: border-box;
}
.ax-dep-sheet .btn-main {
  min-height: 48px;
  border-radius: 10px;
  font-weight: 600;
}

/* ── Unified payment sheets (deposit + withdraw) ── */
.ax-pay-panel {
  --pay-bg: #12161c;
  --pay-surface: #1e2329;
  --pay-border: rgba(255, 255, 255, 0.08);
  --pay-text: #eaecef;
  --pay-muted: #848e9c;
  --pay-accent: #7c6df0;
  --pay-green: #0ecb81;
  --pay-amber: #f0b90b;
  --pay-red: #f6465d;
}

:root[data-theme="ascendex"] .ax-pay-panel .deposit-card,
:root[data-theme="ascendex"] .ax-pay-panel .withdraw-card {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  margin: 0 !important;
}

.ax-pay-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 44px 18px 0;
  margin: 0 0 16px;
  border-bottom: none;
}

.ax-pay-head-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--pay-text);
  line-height: 1.35;
  word-break: break-word;
}

.ax-pay-head-ico {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  flex-shrink: 0;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 18px;
}
.ax-pay-head-ico.dep {
  background-color: rgba(14, 203, 129, 0.12);
  border: 1px solid rgba(14, 203, 129, 0.24);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230ecb81' stroke-width='2'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E");
}
.ax-pay-head-ico.wd {
  background-color: rgba(246, 70, 93, 0.1);
  border: 1px solid rgba(246, 70, 93, 0.24);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f6465d' stroke-width='2'%3E%3Cpath d='M5 12h14'/%3E%3C/svg%3E");
}

.ax-pay-timer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 14px;
  padding: 13px 14px;
  border-radius: 12px;
  background: rgba(14, 203, 129, 0.07) !important;
  border: 1px solid rgba(14, 203, 129, 0.18) !important;
}
.ax-pay-timer span:first-child {
  flex: 1;
  font-size: 13px;
  color: var(--pay-muted);
}
.ax-pay-timer strong,
.ax-pay-timer .dep-timer {
  flex-shrink: 0;
  font-size: 16px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--pay-green) !important;
}

.ax-pay-fields {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 0 14px;
}

.ax-pay-field {
  padding: 14px;
  border-radius: 12px;
  background: var(--pay-surface);
  border: 1px solid var(--pay-border);
  box-sizing: border-box;
  min-width: 0;
}

.ax-pay-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--pay-muted);
  margin-bottom: 8px;
}

.ax-pay-value {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--pay-text);
  line-height: 1.35;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.ax-pay-value-lg {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.ax-pay-field.ax-dep-field-copy {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 10px;
  row-gap: 8px;
}
.ax-pay-field.ax-dep-field-copy .ax-pay-label {
  grid-column: 1 / -1;
  margin-bottom: 0;
}
.ax-pay-field.ax-dep-field-copy .ax-pay-value {
  grid-column: 1;
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px;
}
.ax-pay-copy {
  grid-column: 2;
  grid-row: 2;
  align-self: center;
  justify-self: end;
  min-width: 88px;
  max-width: 100%;
  height: 36px;
  padding: 0 12px;
  margin: 0;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  background: rgba(124, 109, 240, 0.14) !important;
  border: 1px solid rgba(124, 109, 240, 0.28) !important;
  color: #d4cffc !important;
}
.ax-pay-copy:active {
  background: rgba(124, 109, 240, 0.28) !important;
  color: #fff !important;
}

.ax-pay-notice {
  margin: 0 0 14px;
  padding: 13px 14px;
  border-radius: 12px;
  font-size: 12px;
  line-height: 1.5;
  box-sizing: border-box;
}
.ax-pay-notice.warn {
  background: rgba(240, 185, 11, 0.08) !important;
  border: 1px solid rgba(240, 185, 11, 0.22) !important;
  color: #f0d080 !important;
}
.ax-pay-notice.info {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(124, 109, 240, 0.08) !important;
  border: 1px solid rgba(124, 109, 240, 0.18) !important;
  color: #c4b5fd !important;
  margin-bottom: 12px;
}
.ax-pay-notice.info .receipt-notice-text {
  color: inherit !important;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
}

.ax-wd-status-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  padding: 13px 14px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  box-sizing: border-box;
}
.ax-wd-status-banner.pending {
  background: rgba(240, 185, 11, 0.08);
  border: 1px solid rgba(240, 185, 11, 0.22);
  color: #f0b90b;
}
.ax-wd-status-banner.approved {
  background: rgba(14, 203, 129, 0.08);
  border: 1px solid rgba(14, 203, 129, 0.22);
  color: #0ecb81;
}
.ax-wd-status-banner.rejected {
  background: rgba(246, 70, 93, 0.08);
  border: 1px solid rgba(246, 70, 93, 0.22);
  color: #f6465d;
}
.ax-wd-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
  box-shadow: 0 0 8px currentColor;
}

.ax-wd-note {
  margin: 0 0 14px;
  padding: 13px 14px;
  border-radius: 12px;
  background: var(--pay-surface);
  border: 1px solid var(--pay-border);
  font-size: 13px;
  line-height: 1.5;
  color: var(--pay-muted);
  box-sizing: border-box;
}
.ax-wd-note:empty {
  display: none;
}

.ax-pay-receipt {
  margin: 0 0 14px;
  padding: 0;
}
.ax-pay-receipt .receipt-upload {
  margin-bottom: 12px;
}
.ax-pay-upload {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px dashed rgba(255, 255, 255, 0.14) !important;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.ax-pay-upload:active {
  background: rgba(124, 109, 240, 0.1) !important;
  border-color: rgba(124, 109, 240, 0.3) !important;
}
.ax-pay-upload .receipt-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--pay-muted) !important;
}
.ax-pay-receipt .receipt-preview {
  margin-top: 10px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--pay-border);
}
.ax-pay-receipt .receipt-preview img {
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  display: block;
}
.ax-pay-receipt .receipt-remove {
  top: 8px;
  right: 8px;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(18, 22, 28, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #eaecef;
  font-size: 18px;
  line-height: 1;
}

.ax-pay-msg {
  margin: 0 0 12px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.45;
  box-sizing: border-box;
}
.ax-pay-panel .dep-check-msg.warn {
  background: rgba(240, 185, 11, 0.08) !important;
  border: 1px solid rgba(240, 185, 11, 0.22) !important;
  color: #f0d080 !important;
}
.ax-pay-panel .dep-check-msg.ok {
  background: rgba(14, 203, 129, 0.08) !important;
  border: 1px solid rgba(14, 203, 129, 0.22) !important;
  color: #0ecb81 !important;
}
.ax-pay-panel .dep-check-msg.err {
  background: rgba(246, 70, 93, 0.08) !important;
  border: 1px solid rgba(246, 70, 93, 0.22) !important;
  color: #f6465d !important;
}

.ax-pay-credit {
  margin: 0 0 14px;
  padding: 20px 16px;
  border-radius: 14px;
  background: var(--pay-surface);
  border: 1px solid var(--pay-border);
  box-sizing: border-box;
  overflow: hidden;
}

.ax-pay-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}
.ax-pay-actions .ax-pay-btn,
.ax-pay-actions .ax-pay-support,
.ax-pay-actions .ax-pay-btn-secondary,
.ax-pay-receipt .ax-pay-btn {
  width: 100% !important;
  margin: 0 !important;
  box-sizing: border-box;
  border-radius: 10px !important;
  min-height: 48px;
  font-weight: 600;
}
.ax-pay-actions .ax-pay-support,
.ax-pay-panel .ax-pay-support {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 16px;
  text-decoration: none;
  text-align: center;
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid var(--pay-border) !important;
  color: var(--pay-text) !important;
  box-shadow: none !important;
}
.ax-pay-actions .ax-pay-btn-secondary,
.ax-pay-panel .ax-pay-btn-secondary {
  background: transparent !important;
  border: 1px solid var(--pay-border) !important;
  color: var(--pay-muted) !important;
  box-shadow: none !important;
  padding: 14px 16px;
}

/* Stat rows — trade & trader modals */
.ax-stat-list {
  padding: 0 18px 8px;
  width: 100%;
  box-sizing: border-box;
}
.ax-stat-list-trade {
  padding-top: 4px;
}
.ax-stat-list-title {
  padding: 10px 0 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #848e9c;
}
.ax-stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.ax-stat-row:last-child { border-bottom: none; }
.ax-stat-label {
  flex: 0 1 42%;
  font-size: 13px;
  font-weight: 500;
  color: #848e9c;
  line-height: 1.3;
}
.ax-stat-val {
  flex: 1 1 58%;
  font-size: 14px;
  font-weight: 600;
  color: #eaecef;
  text-align: right;
  line-height: 1.3;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.ax-stat-val.up { color: #0ecb81; }
.ax-stat-val.down { color: #f6465d; }
.ax-stat-val.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  color: #b7bdc6;
  white-space: normal;
  word-break: break-all;
}
.ax-stat-list.compact {
  padding: 4px 18px 0;
}
.ax-stat-list.compact .ax-stat-row {
  padding: 11px 0;
}
.ax-stat-list.compact .ax-stat-val {
  white-space: normal;
  word-break: break-word;
  font-size: 13px;
}

/* Trader profile */
.ax-trader-top {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 56px 8px 18px;
  width: 100%;
  box-sizing: border-box;
}
.ax-trader-hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 14px 18px 0;
}
.ax-hero-stat {
  padding: 12px 10px;
  border-radius: 10px;
  background: #1e2329;
  border: 1px solid rgba(255, 255, 255, 0.06);
  min-width: 0;
  text-align: center;
}
.ax-hero-stat span {
  display: block;
  font-size: 10px;
  font-weight: 600;
  color: #848e9c;
  margin-bottom: 6px;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ax-hero-stat strong {
  display: block;
  font-size: clamp(12px, 3.2vw, 15px);
  font-weight: 700;
  color: #eaecef;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-variant-numeric: tabular-nums;
}
.ax-hero-stat.up strong { color: #0ecb81; }
.ax-hero-stat.down strong { color: #f6465d; }

/* Trade modal header */
.ax-trade-head-block {
  padding-top: 8px;
}
.ax-trade-top {
  padding: 10px 56px 0 18px;
}
.ax-trader-name {
  margin-top: 6px;
  font-size: 13px;
  font-weight: 500;
  color: #848e9c;
}
.ax-trade-result {
  margin: 14px 18px 0;
  padding: 16px;
  border-radius: 12px;
  background: #1e2329;
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.ax-result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.ax-result-head .ax-trade-result-label {
  margin-bottom: 0;
}
.ax-result-head .ax-status-chip {
  flex-shrink: 0;
}
.ax-trade-result.up { border-color: rgba(14, 203, 129, 0.2); }
.ax-trade-result.down { border-color: rgba(246, 70, 93, 0.2); }
.ax-trade-result-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: #848e9c;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}
.ax-trade-result-val {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  white-space: nowrap;
}
.ax-trade-result.up .ax-trade-result-val { color: #0ecb81; }
.ax-trade-result.down .ax-trade-result-val { color: #f6465d; }
.ax-trade-result-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-size: 12px;
  color: #848e9c;
}
.ax-dir-badge {
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
}
.ax-dir-badge.up { color: #0ecb81; background: rgba(14, 203, 129, 0.1); }
.ax-dir-badge.down { color: #f6465d; background: rgba(246, 70, 93, 0.1); }
.ax-chg.up { color: #0ecb81; font-weight: 600; }
.ax-chg.down { color: #f6465d; font-weight: 600; }

.ax-sheet-overlay .ax-metric-grid { display: none !important; }

.cabinet-pending-dep {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin: 0;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(14, 203, 129, 0.28);
  background: linear-gradient(135deg, rgba(14, 203, 129, 0.1), rgba(14, 203, 129, 0.04));
  color: #eaecef;
  cursor: pointer;
  text-align: left;
  transition: transform 0.18s ease, border-color 0.2s ease;
}
.cabinet-pending-dep:active { transform: scale(0.985); }
.cabinet-pending-dep-ico {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  flex-shrink: 0;
  background: rgba(14, 203, 129, 0.14);
  border: 1px solid rgba(14, 203, 129, 0.25);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230ecb81' stroke-width='2'%3E%3Cpath d='M12 8v4l3 2'/%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 18px;
}
.cabinet-pending-dep-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.cabinet-pending-dep-body strong {
  font-size: 13px;
  font-weight: 600;
  color: #eaecef;
}
.cabinet-pending-dep-body em {
  font-style: normal;
  font-size: 15px;
  font-weight: 700;
  color: #0ecb81;
  font-variant-numeric: tabular-nums;
}
.cabinet-pending-dep-cta {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 700;
  color: #0ecb81;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(14, 203, 129, 0.1);
  border: 1px solid rgba(14, 203, 129, 0.2);
}

/* Trade / trader modals */
.trade-detail-card.ax-modal-card::before { display: none !important; }

.ax-modal-card {
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow: hidden auto;
  background: #12161c;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px 20px 0 0;
  padding: 0 0 calc(12px + env(safe-area-inset-bottom));
  box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.5);
}
.ax-trade-modal,
.ax-trader-modal { padding-top: 0; }

.ax-sheet-grabber {
  width: 36px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  margin: 12px auto 10px;
}

.ax-trade-header {
  padding: 8px 18px 0;
}
.ax-trade-pairline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.ax-trade-pair-main {
  display: flex;
  align-items: baseline;
  gap: 2px;
  min-width: 0;
}
.ax-trade-base {
  font-size: 20px;
  font-weight: 700;
  color: #eaecef;
  letter-spacing: -0.02em;
}
.ax-trade-quote {
  font-size: 14px;
  font-weight: 600;
  color: #848e9c;
}
.ax-status-chip {
  flex-shrink: 0;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.ax-status-chip.up {
  color: #0ecb81;
  background: rgba(14, 203, 129, 0.12);
  border: 1px solid rgba(14, 203, 129, 0.28);
}
.ax-status-chip.down {
  color: #f6465d;
  background: rgba(246, 70, 93, 0.12);
  border: 1px solid rgba(246, 70, 93, 0.28);
}

.ax-trader-link-chip {
  display: inline-block;
  margin-top: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #848e9c;
  padding: 0;
  background: none;
  border: none;
}

.ax-data-sheet {
  padding: 6px 0 4px;
}
.ax-data-sheet-title {
  padding: 12px 18px 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #848e9c;
}

.ax-kv-table {
  display: flex !important;
  flex-direction: column !important;
  grid-template-columns: unset !important;
  gap: 0 !important;
  padding: 0 18px 8px !important;
}
.ax-kv-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 12px;
  align-items: center;
  padding: 13px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.ax-kv-row:last-child { border-bottom: none; }
.ax-kv-key {
  font-size: 13px;
  color: #848e9c !important;
  font-weight: 500;
  line-height: 1.35;
}
.ax-kv-val {
  font-size: 13px;
  color: #eaecef !important;
  font-weight: 600;
  text-align: right;
  line-height: 1.35;
  word-break: break-word;
  font-variant-numeric: tabular-nums;
}
.ax-kv-val.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  color: #b7bdc6 !important;
}
.ax-kv-val.up { color: #0ecb81 !important; }
.ax-kv-val.down { color: #f6465d !important; }

.ax-modal-actions {
  padding: 12px 18px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: 8px;
}
.ax-modal-actions .btn-main {
  width: 100%;
  min-height: 48px;
  border-radius: 10px !important;
  font-weight: 600 !important;
}

/* Trader profile sheet */
.ax-trader-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 8px 18px 0;
}
.ax-trader-avatar-lg {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: #eaecef;
  background: #1e2329;
  border: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}
.ax-trader-head-main { min-width: 0; flex: 1; }
.ax-trader-kicker {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #848e9c;
  margin-bottom: 4px;
}
.ax-trader-name-lg {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 700;
  color: #eaecef;
  line-height: 1.2;
  word-break: break-word;
}
.ax-trader-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}
.ax-trader-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 600;
  color: #b7bdc6;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
}
.ax-trader-chip.on {
  color: #0ecb81;
  border-color: rgba(14, 203, 129, 0.22);
  background: rgba(14, 203, 129, 0.08);
}
.ax-trader-chip-ico {
  width: 12px;
  height: 12px;
  display: flex;
}
.ax-trader-chip-ico svg {
  width: 12px;
  height: 12px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.ax-trader-kpi-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 14px 18px 0;
}
.ax-trader-kpi {
  padding: 12px 14px;
  border-radius: 10px;
  background: #1e2329;
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.ax-trader-kpi.highlight {
  border-color: rgba(14, 203, 129, 0.2);
  background: linear-gradient(145deg, rgba(14, 203, 129, 0.08), rgba(30, 35, 41, 0.95));
}
.ax-trader-kpi span {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: #848e9c;
  margin-bottom: 4px;
}
.ax-trader-kpi strong {
  font-size: 18px;
  font-weight: 700;
  color: #eaecef;
  font-variant-numeric: tabular-nums;
}
.ax-trader-kpi strong.up { color: #0ecb81; }
.ax-trader-kpi strong.down { color: #f6465d; }

.ax-metric-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px !important;
  padding: 8px 18px 4px !important;
  width: 100% !important;
  box-sizing: border-box;
}
.ax-metric-cell {
  padding: 12px;
  border-radius: 10px;
  background: #1e2329;
  border: 1px solid rgba(255, 255, 255, 0.06);
  min-width: 0;
}
.ax-metric-cell label {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: #848e9c;
  margin-bottom: 6px;
  line-height: 1.25;
}
.ax-metric-cell strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: #eaecef;
  line-height: 1.25;
  word-break: break-word;
  font-variant-numeric: tabular-nums;
}

.trader-profile-card-v2 .trader-profile-stats {
  display: block !important;
  padding: 0 !important;
  grid-template-columns: unset !important;
}
.feed-trade-card .trade-detail-body,
.feed-trade-card .feed-trade-head {
  padding-left: 0;
  padding-right: 0;
}

/* Unified exchange bottom sheets (trade + trader) */
.ax-sheet-overlay {
  position: fixed;
  inset: 0;
  z-index: 520;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 !important;
  background: transparent !important;
  backdrop-filter: none !important;
}
.ax-sheet-overlay.hidden { display: none !important; }
.ax-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
}
.ax-sheet-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  max-height: 88vh;
  overflow: hidden auto;
  border-radius: 20px 20px 0 0;
  background: #12161c;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 -24px 60px rgba(0, 0, 0, 0.55);
  animation: none;
  padding-bottom: calc(8px + env(safe-area-inset-bottom));
}
.ax-sheet-overlay.overlay-open .ax-sheet-panel {
  animation: axSheetUp 0.34s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes axSheetUp {
  from { opacity: 0; transform: translateY(100%); }
  to { opacity: 1; transform: translateY(0); }
}
.ax-sheet-close {
  position: absolute;
  top: 14px;
  right: 16px;
  z-index: 6;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
  color: #848e9c;
}
.ax-sheet-panel .modal-close-btn.ax-sheet-close {
  top: 14px;
  right: 16px;
}
.ax-sheet-head { padding: 4px 18px 0; }
.ax-sheet-body { padding: 0; }
.ax-sheet-body-inner { padding: 0; }
.ax-sheet-footer {
  padding: 12px 18px calc(8px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  box-sizing: border-box;
}
.ax-sheet-footer .btn-main,
.ax-sheet-footer .ax-sheet-btn {
  width: 100% !important;
  max-width: 100%;
  margin: 0 !important;
  display: block;
  box-sizing: border-box;
}
.ax-sheet-btn {
  width: 100%;
  min-height: 48px;
  border-radius: 10px !important;
  font-weight: 600 !important;
}

.ax-sheet-overlay .feed-trade-grid,
.ax-sheet-overlay .trade-detail-grid,
.ax-sheet-overlay .feed-trade-row {
  display: none !important;
}
.ax-sheet-overlay .trade-detail-head,
.ax-sheet-overlay .trade-detail-body,
.ax-sheet-overlay .trader-profile-head,
.ax-sheet-overlay .trader-profile-stats {
  padding-left: 0 !important;
  padding-right: 0 !important;
  margin: 0 !important;
}
.ax-trader-modal .trader-profile-stats,
#trader-profile-stats.trader-profile-stats {
  display: block !important;
  grid-template-columns: none !important;
  gap: 0 !important;
  width: 100% !important;
  padding: 0 !important;
}
.ax-trader-modal .trader-profile-stats .ax-stat-list,
#trader-profile-stats .ax-stat-list {
  width: 100%;
  max-width: 100%;
}
.ax-sheet-overlay .trader-profile-stats .ax-metric-grid {
  padding-top: 0 !important;
}

/* ── Hub cards — same gray frame as deposit/withdraw fields ── */
:root[data-theme="ascendex"] {
  --ax-card-bg: #1e2329;
  --ax-card-border: rgba(255, 255, 255, 0.08);
}

.ax-hub-card,
.live-feed-card,
.live-feed-head,
.explore-news-card,
.ex-digest,
.ex-fng,
.rating-lb-row-v2,
.rating-trade-row-v2,
.trade-row.history-trade-card {
  background: var(--ax-card-bg, #1e2329) !important;
  border: 1px solid var(--ax-card-border, rgba(255, 255, 255, 0.08)) !important;
  border-radius: 12px !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-sizing: border-box;
}

.live-feed-card {
  align-items: flex-start;
  padding: 14px !important;
  gap: 10px !important;
}
.live-feed-card.win {
  border-color: rgba(14, 203, 129, 0.22) !important;
}
.live-feed-card.lose {
  border-color: rgba(246, 70, 93, 0.18) !important;
}
.live-feed-left {
  align-items: flex-start;
  min-width: 0;
}
.live-feed-body {
  min-width: 0;
  overflow: hidden;
}
.live-feed-name {
  white-space: normal !important;
  overflow: hidden !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.3;
  margin-bottom: 6px !important;
}
.live-feed-tags {
  gap: 5px !important;
}
.live-feed-right {
  flex-shrink: 0;
  max-width: 42%;
  padding-top: 2px;
}
.live-feed-pnl {
  font-size: 14px !important;
  line-height: 1.25;
  word-break: break-word;
}
.live-feed-ago {
  margin-top: 4px;
  font-size: 10px !important;
  line-height: 1.3;
  white-space: nowrap;
}

.explore-news-card {
  padding: 14px !important;
  text-align: left;
}
.explore-news-card-top {
  flex-wrap: wrap;
  gap: 6px 10px;
}
.explore-news-title {
  word-break: break-word;
  overflow-wrap: anywhere;
  line-height: 1.35 !important;
}
.explore-news-excerpt {
  word-break: break-word;
  overflow-wrap: anywhere;
  line-height: 1.45 !important;
}
.explore-news-read {
  display: inline-block;
  margin-top: 4px;
}

.rating-lb-row-v2 {
  grid-template-columns: 40px minmax(0, 1fr) auto !important;
  gap: 10px !important;
  padding: 12px 14px !important;
}
.rating-lb-row-v2 .lb-body {
  min-width: 0;
  overflow: hidden;
}
.rating-lb-row-v2 .lb-body strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rating-lb-row-v2 .lb-score {
  flex-shrink: 0;
  max-width: 38%;
  text-align: right;
  line-height: 1.25;
  word-break: break-word;
}

.trade-row.history-trade-card {
  padding: 12px 14px !important;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
  width: 100%;
}
.trade-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}
.trade-row-meta,
.trade-row-date {
  word-break: break-word;
  line-height: 1.35;
}

/* Stat blocks inside modals — gray panel like payment fields */
.ax-stat-panel {
  margin: 8px 18px 14px;
  padding: 4px 14px;
  border-radius: 12px;
  background: #1e2329;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-sizing: border-box;
}
.ax-stat-panel .ax-stat-list {
  padding: 0 !important;
  width: 100%;
}
.ax-stat-panel .ax-stat-list-title {
  padding: 10px 0 6px;
}

.ax-stat-row {
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
}
.ax-stat-label {
  flex: 0 1 46%;
  min-width: 0;
  word-break: break-word;
  overflow-wrap: anywhere;
  line-height: 1.35;
}
.ax-stat-val {
  flex: 1 1 46%;
  min-width: 0;
  white-space: normal !important;
  word-break: break-word;
  overflow-wrap: anywhere;
  text-align: right;
  line-height: 1.35;
}

/* Trader profile header spacing */
.ax-trader-top {
  padding-bottom: 10px;
}
.ax-trader-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.ax-trader-head-main {
  min-width: 0;
}
.ax-trader-name-lg {
  word-break: break-word;
  line-height: 1.25;
}

/* News reader sheet */
.ax-news-modal .ax-news-head {
  padding: 6px 52px 10px 18px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
  color: #eaecef;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.ax-news-body-frame {
  margin: 0 18px 16px;
  padding: 14px;
  border-radius: 12px;
  background: #1e2329;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-sizing: border-box;
}
.ax-news-body-frame .news-reader-body {
  padding: 0;
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: #b7bdc6;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
}

/* Sheet modals — solid panel, no glass bleed */
.ax-sheet-panel.trade-detail-card,
.ax-modal-card {
  background: #12161c !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  backdrop-filter: none !important;
}
.ax-sheet-panel.trade-detail-card::before,
.ax-modal-card::before {
  display: none !important;
}
