/* TORKLERIO H5 v8 - selected account direction, mobile only. */
@media (max-width: 999px) {
  :root {
    --tk-bg: #050608;
    --tk-surface: #0b0d10;
    --tk-surface-2: #111419;
    --tk-line: rgba(255, 255, 255, .105);
    --tk-line-strong: rgba(255, 255, 255, .17);
    --tk-text: #f4f6f8;
    --tk-muted: #8b929d;
    --tk-accent: #b7f523;
    --tk-positive: #36d17c;
    --tk-negative: #ff5263;
  }

  html,
  body,
  #app {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow-x: hidden;
    background: var(--tk-bg) !important;
    color: var(--tk-text) !important;
    font-family: Inter, "SF Pro Display", "SF Pro Text", "Noto Sans TC", "Noto Sans KR", Arial, sans-serif !important;
    letter-spacing: 0 !important;
  }

  #codexExTerminal,
  #codexExStrip,
  #codexExHome,
  #codexExUser,
  #codexExTrade,
  .codex-ex-strip,
  .codex-ex-live-shell,
  .codex-ex-terminal,
  .codex-login-board,
  .codex-premium-board {
    display: none !important;
  }

  body #app :is(
    .home-page,
    .user-page,
    .trade-page,
    .mobile-trade-page,
    .deposit-page,
    .withdraw-page,
    .balance-records-page,
    .orders-page,
    .mobile-orders-page,
    .message-page,
    .message-detail-page,
    .language-page,
    .auth-page,
    .loan-page,
    .loan-record-page,
    .pwd-page
  ) {
    background: var(--tk-bg) !important;
    color: var(--tk-text) !important;
    box-shadow: none !important;
  }

  body #app :is(
    .user-card,
    .menu-list,
    .menu-item,
    .wallet-card,
    .record-card,
    .record-item,
    .order-card,
    .order-item,
    .message-card,
    .lang-list,
    .lang-item,
    .trade-panel,
    .chart-area,
    .panel-section,
    .deposit-card,
    .withdraw-card,
    .loan-card,
    .auth-card,
    .pwd-card
  ) {
    background-image: none !important;
    box-shadow: none !important;
  }

  body #app .user-page {
    min-height: 100dvh !important;
    padding: 0 16px calc(78px + env(safe-area-inset-bottom, 0px)) !important;
  }

  body #app .user-page .page-header {
    position: sticky;
    top: 0;
    z-index: 30;
    height: 70px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    margin: 0 -16px;
    padding: 0 16px;
    border-bottom: 1px solid var(--tk-line);
    background: rgba(5, 6, 8, .96) !important;
    backdrop-filter: none !important;
  }

  body #app .user-page .page-title {
    grid-column: 1;
    padding: 0 !important;
    color: var(--tk-text) !important;
    font-size: 18px !important;
    line-height: 1.2 !important;
    font-weight: 720 !important;
    text-align: left !important;
  }

  .torklerio-user-language {
    grid-column: 2;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    min-width: 52px;
    min-height: 38px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--tk-text);
    font: inherit;
    font-size: 13px;
    font-weight: 650;
    cursor: pointer;
  }

  body #app .user-page .user-card {
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: var(--tk-bg) !important;
  }

  body #app .user-page .user-card::before {
    display: none !important;
  }

  body #app .user-page .user-header {
    display: grid !important;
    grid-template-columns: 56px minmax(0, 1fr) auto;
    gap: 12px !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 24px 0 22px !important;
    border-bottom: 1px solid var(--tk-line);
  }

  body #app .user-page .user-avatar {
    width: 54px !important;
    height: 54px !important;
    border: 1px solid var(--tk-line-strong) !important;
    border-radius: 50% !important;
    background: #17191d !important;
    color: var(--tk-text) !important;
  }

  body #app .user-page .user-avatar svg {
    width: 25px !important;
    height: 25px !important;
    stroke: currentColor !important;
  }

  body #app .user-page .user-info {
    min-width: 0;
  }

  body #app .user-page .user-email {
    overflow: hidden;
    color: var(--tk-text) !important;
    font-size: 17px !important;
    font-weight: 680 !important;
    line-height: 1.35 !important;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body #app .user-page .user-uid {
    margin-top: 4px;
    color: var(--tk-muted) !important;
    font-size: 12px !important;
    font-variant-numeric: tabular-nums;
  }

  body #app .user-page .verified-badge {
    padding: 6px 9px !important;
    border: 1px solid rgba(183, 245, 35, .3) !important;
    border-radius: 6px !important;
    background: rgba(183, 245, 35, .08) !important;
    color: var(--tk-accent) !important;
    font-size: 11px !important;
    font-weight: 720 !important;
    white-space: nowrap;
  }

  body #app .user-page .balance-label {
    margin: 27px 0 0 !important;
    color: var(--tk-muted) !important;
    font-size: 13px !important;
    line-height: 1.4 !important;
  }

  body #app .user-page .balance-row {
    margin: 6px 0 20px !important;
  }

  body #app .user-page .balance-value {
    color: var(--tk-text) !important;
    font-size: 42px !important;
    line-height: 1.12 !important;
    font-weight: 720 !important;
    font-variant-numeric: tabular-nums;
  }

  .torklerio-balance-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    margin-bottom: 22px;
    border-top: 1px solid var(--tk-line);
    border-bottom: 1px solid var(--tk-line);
  }

  .torklerio-balance-detail__item {
    min-width: 0;
    padding: 16px 0 17px;
  }

  .torklerio-balance-detail__item + .torklerio-balance-detail__item {
    padding-left: 18px;
    border-left: 1px solid var(--tk-line);
  }

  .torklerio-balance-detail__label {
    display: block;
    color: var(--tk-muted);
    font-size: 11px;
    line-height: 1.4;
  }

  .torklerio-balance-detail__value {
    display: block;
    margin-top: 5px;
    overflow: hidden;
    color: var(--tk-text);
    font-size: 16px;
    font-weight: 680;
    font-variant-numeric: tabular-nums;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body #app .user-page .quick-actions {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 10px !important;
    margin-bottom: 32px !important;
  }

  body #app .user-page .q-btn {
    min-width: 0;
    min-height: 92px;
    padding: 11px 4px 9px !important;
    border: 1px solid var(--tk-line) !important;
    border-radius: 6px !important;
    background: transparent !important;
    color: var(--tk-text) !important;
    box-shadow: none !important;
  }

  body #app .user-page .q-btn:active {
    border-color: rgba(183, 245, 35, .5) !important;
    background: rgba(183, 245, 35, .05) !important;
  }

  body #app .user-page .q-icon {
    width: 32px !important;
    height: 32px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: var(--tk-text) !important;
  }

  body #app .user-page .q-icon svg,
  body #app .user-page .q-icon img {
    width: 24px !important;
    height: 24px !important;
  }

  body #app .user-page .q-btn span {
    overflow: hidden;
    color: var(--tk-text) !important;
    font-size: 12px !important;
    font-weight: 620 !important;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body #app .user-page .menu-list {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0 !important;
    margin: 0 0 20px !important;
    padding: 0 !important;
    overflow: hidden;
    border: 1px solid var(--tk-line) !important;
    border-radius: 6px !important;
    background: transparent !important;
  }

  body #app .user-page .menu-item {
    min-width: 0;
    min-height: 78px !important;
    padding: 14px 12px !important;
    gap: 10px !important;
    border: 0 !important;
    border-right: 1px solid var(--tk-line) !important;
    border-bottom: 1px solid var(--tk-line) !important;
    border-radius: 0 !important;
    background: transparent !important;
  }

  body #app .user-page .menu-item:nth-child(2n) {
    border-right: 0 !important;
  }

  body #app .user-page .menu-item:nth-last-child(-n + 2) {
    border-bottom: 0 !important;
  }

  body #app .user-page .menu-item:active {
    background: rgba(255, 255, 255, .04) !important;
  }

  body #app .user-page .menu-icon {
    width: 24px !important;
    height: 24px !important;
    flex: 0 0 24px;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
  }

  body #app .user-page .menu-icon img {
    width: 22px !important;
    height: 22px !important;
    opacity: .9;
  }

  body #app .user-page .menu-label {
    min-width: 0;
    overflow: hidden;
    color: var(--tk-text) !important;
    font-size: 13px !important;
    font-weight: 620 !important;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body #app .user-page .menu-arrow {
    width: 13px !important;
    flex: 0 0 13px;
    color: var(--tk-muted) !important;
  }

  body #app .user-page .torklerio-loan-menu {
    display: none !important;
  }

  body #app .user-page .logout-wrap {
    padding: 48px 0 14px !important;
  }

  body #app .user-page .logout-btn {
    min-height: 48px;
    border: 1px solid var(--tk-line) !important;
    border-radius: 6px !important;
    background: transparent !important;
    color: var(--tk-muted) !important;
    box-shadow: none !important;
  }

  body #app .bottom-nav {
    height: calc(62px + env(safe-area-inset-bottom, 0px)) !important;
    padding: 0 6px env(safe-area-inset-bottom, 0px) !important;
    border-top: 1px solid var(--tk-line-strong) !important;
    background: rgba(5, 6, 8, .98) !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
  }

  body #app .bottom-nav .nav-item {
    min-width: 0 !important;
    color: var(--tk-muted) !important;
    font-size: 10px !important;
    font-weight: 560 !important;
  }

  body #app .bottom-nav .nav-item svg {
    width: 20px !important;
    height: 20px !important;
  }

  body #app .bottom-nav .nav-item.active,
  body #app .bottom-nav .nav-item:hover {
    color: var(--tk-accent) !important;
  }

  body #app :is(.submit-btn, .login-btn, .confirm-btn, .btn-confirm) {
    border-radius: 6px !important;
    background: var(--tk-accent) !important;
    color: #101400 !important;
    box-shadow: none !important;
  }

  body #app :is(.input, input, textarea, select) {
    border-radius: 6px !important;
  }
}
