/* BytePay Home Exact Match — reference dark fintech UI */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@600;700&family=Plus+Jakarta+Sans:wght@500;600;700;800&display=swap');

@media (max-width: 991.98px) {
  :root {
    --bx-bg: #0A0F1D;
    --bx-card: #151B2B;
    --bx-card-2: #111827;
    --bx-line: rgba(148, 163, 184, 0.16);
    --bx-text: #F8FAFC;
    --bx-muted: #94A3B8;
    --bx-orange: #F97316;
    --bx-orange-2: #FB923C;
    --bx-green: #34D399;
    --bx-font: 'Plus Jakarta Sans', Inter, system-ui, sans-serif;
    --bx-mono: 'JetBrains Mono', ui-monospace, monospace;
  }

  html body.dashboard-user-layout,
  html body.dashboard-user-layout #mainArea,
  html body.dashboard-user-layout .dashboard-main-area,
  html body.dashboard-user-layout .dashboard-main-content,
  html body.dashboard-home-route .dashboard-main-area,
  html body.dashboard-home-route .dashboard-main-content {
    background: var(--bx-bg) !important;
    color: var(--bx-text) !important;
    font-family: var(--bx-font) !important;
  }

  /* ===== Header ===== */
  html body.dashboard-user-layout .dk-mobile-header {
    height: auto !important;
    min-height: 64px;
    padding: 10px 16px !important;
    background: rgba(10, 15, 29, 0.94) !important;
    border-bottom: 1px solid var(--bx-line) !important;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  html body.dashboard-user-layout .dk-mobile-header__profile {
    display: flex !important;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
  }

  html body.dashboard-user-layout .dk-avatar {
    position: relative;
    width: 44px !important;
    height: 44px !important;
    border-radius: 50% !important;
    border: 2px solid var(--bx-orange) !important;
    background: #0F172A !important;
    color: #fff !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    overflow: visible !important;
  }

  html body.dashboard-user-layout .dk-avatar::after {
    content: '';
    position: absolute;
    right: -1px;
    bottom: -1px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #22C55E;
    border: 2px solid var(--bx-bg);
  }

  html body.dashboard-user-layout .dk-greet {
    min-width: 0;
  }

  html body.dashboard-user-layout .dk-greet__name {
    display: flex;
    align-items: center;
    gap: 6px;
  }

  html body.dashboard-user-layout .dk-greet__txt {
    color: #fff !important;
    font-size: 15px !important;
    font-weight: 800 !important;
    letter-spacing: -0.01em;
  }

  html body.dashboard-user-layout .dk-greet__verified {
    color: var(--bx-orange);
    font-size: 14px;
  }

  html body.dashboard-user-layout .dk-greet__sub {
    display: block;
    margin-top: 2px;
    color: var(--bx-muted) !important;
    font-size: 11px !important;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  html body.dashboard-user-layout .dk-mobile-header__actions {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  html body.dashboard-user-layout .dk-icon-btn {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    border-radius: 50% !important;
    background: #151B2B !important;
    border: 1px solid var(--bx-line) !important;
    color: #E2E8F0 !important;
    position: relative;
  }

  html body.dashboard-user-layout .dk-icon-btn--help {
    color: var(--bx-orange) !important;
  }

  html body.dashboard-user-layout .dk-help-badge {
    display: none !important;
  }

  html body.dashboard-user-layout .dk-icon-btn .badge-num {
    position: absolute;
    top: -3px;
    right: -3px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--bx-orange) !important;
    color: #fff !important;
    font-size: 9px;
    font-weight: 800;
    display: grid;
    place-items: center;
  }

  /* ===== Home shell ===== */
  .bx-home {
    padding: 8px 0 110px;
    background: var(--bx-bg);
  }

  .bx-pad {
    padding-left: 16px;
    padding-right: 16px;
  }

  /* Balance card */
  .bx-balance {
    position: relative;
    overflow: hidden;
    margin: 4px 16px 0;
    padding: 16px;
    border-radius: 24px;
    background:
      radial-gradient(circle at 92% 18%, rgba(249, 115, 22, 0.28), transparent 36%),
      linear-gradient(160deg, #1A2336 0%, #121A2B 48%, #0F1624 100%);
    border: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.32);
  }

  .bx-balance__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }

  .bx-balance__label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #CBD5E1;
    font-size: 12px;
    font-weight: 600;
    background: transparent;
    border: 0;
    padding: 0;
    min-height: 44px;
  }

  .bx-currency {
    display: inline-flex;
    padding: 3px;
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.55);
    border: 1px solid rgba(148, 163, 184, 0.18);
  }

  .bx-currency__btn {
    min-width: 44px;
    min-height: 30px;
    padding: 0 10px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #94A3B8;
    font-size: 11px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
  }

  .bx-currency__btn.is-active {
    background: var(--bx-orange);
    color: #fff;
  }

  .bx-currency__flag {
    display: none;
    margin-right: 4px;
    font-size: 10px;
    line-height: 1;
  }

  .bx-currency__btn.is-active .bx-currency__flag {
    display: inline;
  }

  .bx-balance__amount-row {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    margin-top: 10px;
    text-decoration: none;
  }

  .bx-balance__amount {
    font-family: var(--bx-mono);
    font-size: 34px;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: #fff;
    line-height: 1;
    font-variant-numeric: tabular-nums;
  }

  .bx-balance__trend {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 4px;
    color: var(--bx-green);
    font-size: 12px;
    font-weight: 700;
  }

  .bx-balance__trend i {
    color: var(--bx-orange);
  }

  .bx-balance__va {
    margin-top: 8px;
    color: #94A3B8;
    font-size: 11px;
    font-weight: 500;
  }

  .bx-balance__actions {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 10px;
    margin-top: 16px;
  }

  .bx-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    border-radius: 14px;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
  }

  .bx-btn--primary {
    background: var(--bx-orange);
    color: #fff;
    box-shadow: 0 10px 24px rgba(249, 115, 22, 0.35);
  }

  .bx-btn--ghost {
    background: rgba(15, 23, 42, 0.72);
    color: var(--bx-orange-2);
    border: 1px solid rgba(249, 115, 22, 0.35);
  }

  .bx-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    padding: 12px 0 2px;
  }

  .bx-dots span {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: #475569;
  }

  .bx-dots span.is-active {
    width: 18px;
    background: var(--bx-orange);
  }

  /* Quick actions */
  .bx-quick {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin: 10px 16px 0;
  }

  .bx-quick__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 88px;
    padding: 12px 6px;
    border-radius: 18px;
    background: rgba(21, 27, 43, 0.92);
    border: 1px solid var(--bx-line);
    color: #E2E8F0;
    text-decoration: none;
    font-size: 11px;
    font-weight: 700;
    transition: transform 0.12s ease;
  }

  .bx-quick__item:active {
    transform: scale(0.96);
  }

  .bx-quick__item.is-accent {
    background: rgba(249, 115, 22, 0.14);
    border-color: rgba(249, 115, 22, 0.35);
    color: var(--bx-orange-2);
  }

  .bx-quick__icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: rgba(249, 115, 22, 0.12);
    color: var(--bx-orange);
    font-size: 18px;
  }

  /* Promo */
  .bx-promo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 14px 16px 0;
    padding: 14px;
    border-radius: 18px;
    background: rgba(21, 27, 43, 0.95);
    border: 1px solid rgba(249, 115, 22, 0.28);
    text-decoration: none;
  }

  .bx-promo__icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: var(--bx-orange);
    color: #fff;
    flex-shrink: 0;
  }

  .bx-promo__copy {
    min-width: 0;
    flex: 1;
  }

  .bx-promo__copy strong {
    display: block;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
  }

  .bx-promo__copy span {
    display: block;
    margin-top: 2px;
    color: #94A3B8;
    font-size: 11px;
  }

  .bx-promo__cta {
    min-height: 36px;
    padding: 0 14px;
    border-radius: 999px;
    background: var(--bx-orange);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
  }

  /* Services */
  .bx-section {
    margin: 18px 16px 0;
  }

  .bx-section__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
  }

  .bx-section__title {
    margin: 0;
    color: #64748B;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }

  .bx-filters {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .bx-filters::-webkit-scrollbar { display: none; }

  .bx-filters button {
    min-height: 32px;
    padding: 0 10px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #64748B;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
  }

  .bx-filters button.is-active {
    background: rgba(249, 115, 22, 0.14);
    color: var(--bx-orange-2);
  }

  .bx-activity .bx-filters button.is-active {
    background: transparent;
    color: #fff;
  }

  .bx-services {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
  }

  .bx-service {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 96px;
    padding: 12px 6px 10px;
    border-radius: 18px;
    background: rgba(21, 27, 43, 0.92);
    border: 1px solid var(--bx-line);
    color: #E2E8F0;
    text-decoration: none;
    font-size: 10px;
    font-weight: 700;
    text-align: center;
    line-height: 1.2;
  }

  .bx-service__badge {
    position: absolute;
    top: -6px;
    right: 4px;
    max-width: 64px;
    padding: 2px 6px;
    border-radius: 999px;
    background: var(--bx-orange);
    color: #fff;
    font-size: 8px;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .bx-service__icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: rgba(249, 115, 22, 0.12);
    color: var(--bx-orange);
  }

  .bx-service span.label {
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* Activity — History-style wallet ledger rows */
  .bx-activity {
    margin: 18px 16px 0;
    padding: 0;
    border-radius: 0;
    background: transparent;
    border: 0;
  }

  .bx-activity .bx-section__head {
    margin-bottom: 10px;
  }

  .bx-activity__list {
    padding: 0;
    border-radius: 0;
    background: transparent;
    border: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .bx-activity__footer {
    padding: 10px 2px 2px;
    text-align: right;
  }

  .bx-activity__link {
    color: #94A3B8;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }

  .bx-activity__link:hover {
    color: #F97316;
  }

  .bx-activity .bx-trx,
  .bx-activity .bxh-row {
    display: grid !important;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    width: 100%;
    text-align: left;
    min-height: 0;
    padding: 12px;
    margin: 0;
    border-radius: 14px;
    background: #121826 !important;
    border: 1px solid rgba(148, 163, 184, 0.16) !important;
    color: inherit;
    box-shadow: none;
  }

  .bx-activity .bx-trx + .bx-trx {
    border-top: 1px solid rgba(148, 163, 184, 0.16) !important;
  }

  .bx-activity .bx-trx__icon,
  .bx-activity .bxh-row__icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    color: #fff;
    background: rgba(148, 163, 184, 0.16);
  }

  .bx-activity .bx-trx[data-tone="pending"] .bx-trx__icon,
  .bx-activity .bx-trx[data-tone="failed"] .bx-trx__icon,
  .bx-activity .bxh-row[data-tone="pending"] .bxh-row__icon,
  .bx-activity .bxh-row[data-tone="failed"] .bxh-row__icon {
    background: rgba(251, 191, 36, 0.16);
    color: #FBBF24;
  }

  .bx-activity .bx-trx[data-tone="in"] .bx-trx__icon,
  .bx-activity .bx-trx__icon.is-in,
  .bx-activity .bxh-row[data-tone="in"] .bxh-row__icon {
    background: rgba(52, 211, 153, 0.16);
    color: #34D399;
  }

  .bx-activity .bx-trx[data-tone="out"] .bx-trx__icon,
  .bx-activity .bx-trx__icon.is-out,
  .bx-activity .bxh-row[data-tone="out"] .bxh-row__icon {
    background: rgba(248, 113, 113, 0.14);
    color: #FCA5A5;
  }

  .bx-activity .bx-trx[data-tone="neutral"] .bx-trx__icon,
  .bx-activity .bxh-row[data-tone="neutral"] .bxh-row__icon {
    background: rgba(59, 130, 246, 0.16);
    color: #60A5FA;
  }

  .bx-activity .bx-trx__body,
  .bx-activity .bxh-row__body {
    min-width: 0;
  }

  .bx-activity .bx-trx__title,
  .bx-activity .bxh-row__title {
    display: block;
    font-size: 13px;
    font-weight: 800;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .bx-activity .bx-trx__time,
  .bx-activity .bxh-row__meta {
    display: block;
    margin-top: 3px;
    font-size: 11px;
    color: #94A3B8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .bx-activity .bx-trx__meta,
  .bx-activity .bxh-row__side {
    text-align: right;
    flex-shrink: 0;
  }

  .bx-activity .bx-trx__amt,
  .bx-activity .bxh-row__amount {
    display: block;
    font-family: var(--bx-mono), 'JetBrains Mono', ui-monospace, monospace;
    font-size: 13px;
    font-weight: 800;
    color: #F8FAFC;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
  }

  .bx-activity .bx-trx[data-tone="in"] .bx-trx__amt,
  .bx-activity .bx-trx__amt.is-in,
  .bx-activity .bxh-row[data-tone="in"] .bxh-row__amount {
    color: #34D399;
  }

  .bx-activity .bx-trx[data-tone="pending"] .bx-trx__amt,
  .bx-activity .bxh-row[data-tone="pending"] .bxh-row__amount {
    color: #FBBF24;
  }

  .bx-activity .bx-trx__status,
  .bx-activity .bxh-row__status {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    margin-top: 4px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border: 1px solid currentColor;
    color: #94A3B8;
    background: rgba(148, 163, 184, 0.08);
  }

  .bx-activity .bxh-row__status--completed,
  .bx-activity .bxh-row__status--success {
    color: #34D399;
    background: rgba(52, 211, 153, 0.1);
  }

  .bx-activity .bxh-row__status--pending {
    color: #FBBF24;
    background: rgba(251, 191, 36, 0.1);
  }

  .bx-activity .bxh-row__status--failed,
  .bx-activity .bxh-row__status--canceled,
  .bx-activity .bxh-row__status--rejected {
    color: #F87171;
    background: rgba(248, 113, 113, 0.1);
  }

  .bx-empty {
    padding: 28px 16px;
    text-align: center;
    color: #94A3B8;
    font-size: 13px;
    border-radius: 16px;
    background: #121826;
    border: 1px solid rgba(148, 163, 184, 0.16);
  }

  /* Tab bar exact */
  html body.dashboard-user-layout .dk-tabbar {
    background: rgba(10, 15, 29, 0.97) !important;
    border-top: 1px solid var(--bx-line) !important;
    box-shadow: 0 -12px 30px rgba(0, 0, 0, 0.35) !important;
  }

  html body.dashboard-user-layout .dk-tab {
    color: #64748B !important;
    min-height: 52px !important;
  }

  html body.dashboard-user-layout .dk-tab.is-active,
  html body.dashboard-user-layout .dk-tab[data-active="1"] {
    color: var(--bx-orange) !important;
  }

  html body.dashboard-user-layout .dk-tab.is-active i,
  html body.dashboard-user-layout .dk-tab[data-active="1"] i {
    background: rgba(249, 115, 22, 0.14);
    border-radius: 12px;
    width: 34px;
    height: 28px;
    display: grid;
    place-items: center;
  }

  html body.dashboard-user-layout .dk-fab {
    background: var(--bx-orange) !important;
    border: 3px solid var(--bx-bg) !important;
    color: #fff !important;
    box-shadow: 0 12px 28px rgba(249, 115, 22, 0.45) !important;
    width: 58px !important;
    height: 58px !important;
  }

  html body.dashboard-user-layout .dk-fab i {
    color: #fff !important;
  }

  html body.dashboard-user-layout .dk-fab-slot::after {
    content: 'Pay' !important;
    color: var(--bx-orange) !important;
  }

  html body.dashboard-user-layout .dk-fab-slot:has(.dk-fab--home)::after {
    content: 'Home' !important;
  }

  html body.dashboard-user-layout a.dk-fab {
    display: grid !important;
    place-items: center !important;
    text-decoration: none !important;
  }

  html body.dashboard-user-layout .dk-sheet,
  html body.dashboard-user-layout .dk-apps-sheet,
  html body.dashboard-user-layout .dk-more-sheet,
  html body.dashboard-user-layout .quick-function-menu {
    background: #151B2B !important;
    color: #F8FAFC !important;
  }

  /* Hide old opay leftovers if any remain */
  body.dashboard-home-route .dk-opay-home:not(.bx-home) {
    display: none !important;
  }
}
