:root {
  font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  font-weight: 400;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

@font-face {
  font-family: 'Alimama ShuHeiTi';
  src: url('@/assets/font/AlimamaShuHeiTi-Bold.woff2') format('woff2')
}

@font-face {
  font-family: 'AlibabaSans';
  src: url('@/assets/font/AlibabaSans-MediumItalic.woff2')
}

a {
  font-weight: 500;
  color: #646cff;
  text-decoration: inherit;
}

a:hover {
  color: #535bf2;
}

body {
  margin: 0;
  min-height: 100vh;
  min-width: 0;
  width: 100%;
}

html {
  -webkit-text-size-adjust: 100%;
}

h1 {
  font-size: 3.2em;
  line-height: 1.1;
}

#app {
  width: 100%;
  min-height: 100vh;
  padding: 0;
  margin: 0;
}

.store-page,
.store-page .arco-card,
.store-page .arco-card .arco-card-body {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

@media (min-width: 769px) {
  .queryForm.app-query-form,
  .query-row {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: flex-start;
  }

  .queryForm.app-query-form > .arco-col:first-child,
  .query-row .query-main {
    flex: 1 1 auto !important;
    max-width: 100% !important;
    min-width: 0;
  }

  .queryForm.app-query-form > .arco-col:last-child,
  .query-row > .arco-col[style*='text-align: right'],
  .query-row .app-query-actions {
    flex: 0 0 86px !important;
    max-width: 86px !important;
    text-align: right;
  }
}

@media (max-width: 768px) {
  .arco-modal-wrapper {
    box-sizing: border-box;
    padding: 0 12px;
    max-width: 100vw;
  }

  .arco-modal,
  .arco-modal-simple,
  .arco-modal-default {
    width: calc(100vw - 24px) !important;
    max-width: calc(100vw - 24px) !important;
    min-width: 0 !important;
    margin: 12px auto !important;
    box-sizing: border-box;
  }

  .arco-modal .arco-modal-title,
  .arco-modal .arco-modal-body {
    word-break: break-word;
    overflow-wrap: anywhere;
  }

  .arco-modal .arco-modal-header {
    padding: 14px 16px 10px;
  }

  .arco-modal .arco-modal-body,
  .arco-modal .arco-modal-footer {
    padding-left: 16px;
    padding-right: 16px;
  }

  .arco-modal .arco-modal-body {
    max-height: 70vh;
    overflow-y: auto;
  }

  .arco-modal .arco-modal-footer,
  .arco-modal-confirm .arco-modal-footer,
  .arco-modal-simple .arco-modal-footer {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: stretch;
    gap: 10px;
  }

  .arco-modal .arco-modal-footer .arco-btn,
  .arco-modal-confirm .arco-modal-footer .arco-btn,
  .arco-modal-simple .arco-modal-footer .arco-btn {
    flex: 1 1 0;
    min-width: 0;
    width: auto !important;
    margin: 0 !important;
  }

  .arco-drawer {
    width: 100vw !important;
    max-width: 100vw !important;
  }

  .arco-drawer .arco-drawer-body {
    padding: 14px 16px 16px;
  }

  .arco-drawer .arco-drawer-footer {
    padding: 10px 16px 14px;
  }

  .arco-tabs-nav {
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .arco-tabs-nav::-webkit-scrollbar {
    display: none;
  }

  .queryForm .arco-row > .arco-col,
  .app-query-form .arco-row > .arco-col {
    flex: 0 0 100% !important;
    max-width: 100% !important;
  }

  .queryForm .arco-divider-vertical,
  .app-query-form .arco-divider-vertical {
    display: none !important;
  }

  .queryForm ~ .arco-col[style*='text-align: right'],
  .app-query-actions {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    text-align: left !important;
    margin-top: 6px;
  }

  .queryForm.app-query-form {
    display: block;
  }

  .queryForm.app-query-form > .arco-col {
    flex: 0 0 100% !important;
    max-width: 100% !important;
  }

  .queryForm.app-query-form > .arco-col:last-child {
    margin-top: 6px;
    text-align: left !important;
  }

  .queryForm.app-query-form > .arco-col:last-child .arco-space {
    width: 100%;
    flex-direction: row !important;
    gap: 10px !important;
  }

  .queryForm.app-query-form > .arco-col:last-child .arco-space .arco-space-item {
    flex: 1;
  }

  .queryForm.app-query-form > .arco-col:last-child .arco-btn {
    width: 100%;
  }

  .store-page .arco-card .arco-table-th {
    white-space: nowrap;
  }

  .store-page .arco-card .arco-table-td {
    vertical-align: middle;
    word-break: break-word;
    overflow-wrap: anywhere;
  }

  /* Arco 单行省略 + AutoTooltip 需保持 nowrap，悬停才显示气泡 */
  .store-page .arco-card .arco-table-td .arco-auto-tooltip,
  .store-page .arco-card .arco-table-td .arco-table-text-ellipsis {
    white-space: nowrap;
  }

  .store-page .arco-card .arco-form .arco-row > .arco-col {
    flex: 0 0 100% !important;
    max-width: 100% !important;
  }

  .store-page .arco-card .arco-form .arco-input-wrapper,
  .store-page .arco-card .arco-form .arco-select-view,
  .store-page .arco-card .arco-form .arco-picker,
  .store-page .arco-card .arco-form .arco-input-number {
    width: 100% !important;
    max-width: 100%;
  }

  .store-page .arco-card .arco-form .arco-form-item-label-col > label {
    white-space: nowrap;
    justify-content: flex-start !important;
    text-align: left !important;
  }

  .store-page .arco-card .arco-form .arco-form-item-label-col {
    justify-content: flex-start !important;
    text-align: left !important;
  }
}
