@media (min-width: 768px) {
  .codex-mobile-account-toolbar,
  .codex-mobile-account-search,
  .codex-mobile-account-cards,
  .codex-mobile-filter-backdrop,
  .codex-mobile-filter-close {
    display: none !important;
  }
}

@media (max-width: 767px) {
  body.codex-mobile-account-page {
    overflow-x: hidden;
  }

  body.codex-mobile-account-page .vben-page-content,
  body.codex-mobile-account-page [class*="page-content"] {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }

  body.codex-mobile-account-page .codex-mobile-account-toolbar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 10px 0 12px;
  }

  body.codex-mobile-account-page .codex-mobile-account-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 58px 54px;
    gap: 8px;
    margin: 10px 0 12px;
    padding: 0 2px;
  }

  body.codex-mobile-account-page .codex-mobile-account-search input {
    appearance: none;
    width: 100%;
    min-width: 0;
    height: 40px;
    border: 1px solid #d9dee8;
    border-radius: 8px;
    background: #fff;
    color: #111827;
    font-size: 15px;
    line-height: 40px;
    padding: 0 12px;
    outline: none;
  }

  body.codex-mobile-account-page .codex-mobile-account-search input:focus {
    border-color: #1677ff;
    box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.12);
  }

  body.codex-mobile-account-page .codex-mobile-account-search button {
    appearance: none;
    min-width: 0;
    height: 40px;
    border: 1px solid #d9d9d9;
    border-radius: 8px;
    background: #fff;
    color: #1f2937;
    font-size: 14px;
    line-height: 1;
    padding: 0 8px;
  }

  body.codex-mobile-account-page .codex-mobile-account-search [data-role="search"] {
    border-color: #1677ff;
    background: #1677ff;
    color: #fff;
  }

  .codex-mobile-account-toolbar button,
  .codex-mobile-card-actions button,
  .codex-mobile-filter-close {
    appearance: none;
    border: 1px solid #d9d9d9;
    border-radius: 8px;
    background: #fff;
    color: #1f2937;
    font-size: 14px;
    line-height: 1;
    min-height: 38px;
    padding: 0 12px;
  }

  .codex-mobile-account-toolbar button:first-child,
  .codex-mobile-card-actions button.is-primary,
  .codex-mobile-filter-close {
    border-color: #1677ff;
    background: #1677ff;
    color: #fff;
  }

  .codex-mobile-card-actions button.is-danger {
    border-color: #ff4d4f;
    color: #ff4d4f;
  }

  body.codex-mobile-account-page .filter-bar {
    display: none !important;
  }

  body.codex-mobile-account-page .filter-bar.codex-mobile-filter-open {
    display: block !important;
    position: fixed !important;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3100;
    max-height: min(82vh, 620px);
    overflow-y: auto;
    margin: 0 !important;
    padding: 18px 14px 74px !important;
    border-radius: 16px 16px 0 0 !important;
    background: #fff !important;
    box-shadow: 0 -10px 34px rgba(15, 23, 42, 0.18);
  }

  body.codex-mobile-account-page .filter-bar.codex-mobile-filter-open::before {
    content: "筛选条件";
    display: block;
    margin: 0 0 12px;
    color: #111827;
    font-size: 16px;
    font-weight: 600;
  }

  body.codex-mobile-account-page .filter-bar.codex-mobile-filter-open .ant-row,
  body.codex-mobile-account-page .filter-bar.codex-mobile-filter-open .ant-space {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    width: 100% !important;
  }

  body.codex-mobile-account-page .filter-bar.codex-mobile-filter-open .ant-col,
  body.codex-mobile-account-page .filter-bar.codex-mobile-filter-open .ant-input,
  body.codex-mobile-account-page .filter-bar.codex-mobile-filter-open .ant-select,
  body.codex-mobile-account-page .filter-bar.codex-mobile-filter-open .ant-input-affix-wrapper {
    width: 100% !important;
    max-width: none !important;
  }

  body.codex-mobile-account-page .codex-mobile-filter-backdrop {
    position: fixed;
    inset: 0;
    z-index: 3090;
    display: none;
    background: rgba(15, 23, 42, 0.42);
  }

  body.codex-mobile-account-page.codex-mobile-filter-sheet-open .codex-mobile-filter-backdrop,
  body.codex-mobile-account-page.codex-mobile-filter-sheet-open .codex-mobile-filter-close {
    display: block !important;
  }

  body.codex-mobile-account-page .codex-mobile-filter-close {
    position: fixed;
    left: 14px;
    right: 14px;
    bottom: 14px;
    z-index: 3110;
    height: 44px;
    font-size: 15px;
  }

  html.codex-mobile-account-page .vxe-grid,
  html.codex-mobile-account-page .review-grid-scroll-shell,
  html.codex-mobile-account-page .vxe-toolbar,
  body.codex-mobile-account-page .vxe-grid,
  body.codex-mobile-account-page .review-grid-scroll-shell,
  body.codex-mobile-account-page .vxe-toolbar {
    display: none !important;
  }

  body.codex-mobile-account-page .codex-mobile-account-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 140px;
  }

  .codex-mobile-account-card {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
    overflow: hidden;
  }

  .codex-mobile-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 14px 10px;
    border-bottom: 1px solid #edf1f7;
  }

  .codex-mobile-card-title {
    color: #111827;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.25;
    word-break: break-word;
  }

  .codex-mobile-card-subtitle {
    margin-top: 5px;
    color: #6b7280;
    font-size: 14px;
    line-height: 1.4;
    word-break: break-word;
  }

  .codex-mobile-phone-link {
    color: #1677ff;
    text-decoration: none;
    -webkit-tap-highlight-color: rgba(22, 119, 255, 0.14);
  }

  .codex-mobile-card-status {
    flex: 0 0 auto;
    max-width: 116px;
    border-radius: 999px;
    background: #e6f4ff;
    color: #1677ff;
    font-size: 12px;
    line-height: 1.2;
    padding: 5px 8px;
    text-align: center;
  }

  .codex-mobile-card-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 12px;
    padding: 12px 14px 6px;
  }

  .codex-mobile-card-field {
    min-width: 0;
  }

  .codex-mobile-card-label {
    color: #9ca3af;
    font-size: 13px;
    line-height: 1.2;
  }

  .codex-mobile-card-value {
    margin-top: 5px;
    color: #1f2937;
    font-size: 16px;
    line-height: 1.35;
    word-break: break-word;
  }

  .codex-mobile-card-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding: 10px 14px 14px;
  }

  .codex-mobile-card-actions button {
    width: 100%;
    min-width: 0;
    min-height: 42px;
    font-size: 15px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .codex-mobile-card-actions button.is-copy {
    border-color: #d9d9d9;
    background: #fff;
    color: #1f2937;
  }

  .codex-mobile-empty,
  .codex-mobile-loading {
    border: 1px dashed #d9d9d9;
    border-radius: 10px;
    background: #fff;
    color: #6b7280;
    font-size: 14px;
    padding: 28px 12px;
    text-align: center;
  }

  body.codex-mobile-account-page .ant-modal {
    top: 18px !important;
    max-width: calc(100vw - 20px) !important;
    width: calc(100vw - 20px) !important;
    margin: 0 auto !important;
    padding-bottom: 0 !important;
  }

  body.codex-mobile-account-page .ant-modal-content {
    border-radius: 14px !important;
    max-height: calc(100vh - 72px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  body.codex-mobile-account-page .ant-modal-header {
    flex: 0 0 auto;
    padding: 16px 16px 10px !important;
  }

  body.codex-mobile-account-page .ant-modal-title {
    font-size: 18px !important;
    line-height: 1.35 !important;
  }

  body.codex-mobile-account-page .ant-modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto !important;
    padding: 10px 14px 14px !important;
    -webkit-overflow-scrolling: touch;
  }

  body.codex-mobile-account-page .ant-descriptions,
  body.codex-mobile-account-page .ant-table-wrapper {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  body.codex-mobile-account-page .ant-descriptions-view {
    min-width: 660px;
  }

  body.codex-mobile-account-page .ant-descriptions-view table,
  body.codex-mobile-account-page .ant-table {
    table-layout: auto !important;
  }

  body.codex-mobile-account-page .ant-descriptions-item-label,
  body.codex-mobile-account-page .ant-descriptions-item-content,
  body.codex-mobile-account-page .ant-table-cell {
    min-width: 92px;
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: anywhere;
    writing-mode: horizontal-tb !important;
  }

  body.codex-mobile-account-page .ant-descriptions-item-label {
    color: #6b7280 !important;
    font-weight: 500;
  }
}

@media (max-width: 370px) {
  .codex-mobile-card-fields {
    grid-template-columns: 1fr;
  }

  .codex-mobile-card-actions {
    grid-template-columns: 1fr 1fr;
  }
}
