.order-history { padding: 8px 20px 14px; background: #fff; box-sizing: border-box; }
.order-history-caption { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 13px; color: #606266; min-height: 28px; }
.order-history-caption output { font-variant-numeric: tabular-nums; }
.order-history-caption button, .mobile-parent-link { background: transparent; border: 0; color: #246bb5; cursor: pointer; font: inherit; }
.order-history-caption button { padding: 6px 2px; margin-left: auto; }
.order-history input[type=range] { display: block; width: 100%; min-height: 34px; margin: 0; accent-color: #409eff; cursor: pointer; }
.mobile-parent-link { display: none; }
@media (max-width: 767px) {
  html, body, #app { width: 100%; min-width: 0; }
  #app .layout-container, #app .el-container, #app .layout-main, #app .layout-scrollbar,
  #app .layout-view-bg-white, #app .dashboard-container, #app .xc-config-from, #app .el-card, #app .el-card__body {
    box-sizing: border-box; min-width: 0; max-width: 100%;
  }
  #app .layout-container { width: 100%; height: 100vh; height: 100dvh; }
  #app .layout-main { display: flex; flex-direction: column; min-height: 0; padding-inline: 0; }
  #app .layout-main > .layout-scrollbar { flex: 1 1 0; min-height: 0 !important; width: 100%; }
  #app .layout-main > div:not(.layout-scrollbar) { min-width: 0; max-width: 100%; }
  #app .layout-main > div:has(iframe#iframe) { flex: 1 1 0; min-height: 0; }
  #app .layout-main iframe#iframe { display: block; border: 0; width: 100%; }
  #app .layout-scrollbar > .el-scrollbar__wrap { overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
  #app .layout-scrollbar > .el-scrollbar__wrap > .el-scrollbar__view { box-sizing: border-box; min-width: 0; max-width: 100%; }
  #app .mobile-parent-link { flex-shrink: 0; display: block; align-self: flex-start; min-height: 34px; padding: 5px 12px; font-size: 14px; }
  #app .layout-navbars-breadcrumb-user { min-width: 0; }
  #app .layout-navbars-breadcrumb-user > div:first-child:empty { width: 0 !important; }
  #app .layout-navbars-breadcrumb-icon { display: inline-grid; place-items: center; min-width: 40px; min-height: 40px; }
  #app .layout-navbars-breadcrumb-user .el-button { min-height: 36px; }
  #app .el-card__header, #app .el-card__body { padding: 10px; }
  #app .dashboard-container { padding-inline: 6px; }
  #app .el-row { margin-left: 0 !important; margin-right: 0 !important; }
  #app .el-row > [class*="el-col-"] { min-width: 0; max-width: 100%; }
  #app .dashboard-container > .el-row > .el-col, #app .xc-config-from > .el-row > .el-col { width: 100%; padding-inline: 0 !important; }
  #app .home .home-recommend-row { display: flex; flex-wrap: wrap; }
  #app .home .home-recommend-row > .el-col { width: 50%; padding-inline: 3px !important; }
  #app .home .home-recommend-row > .el-col:last-child:nth-child(odd) { width: 100%; }
  #app .home .home-recommend-auto { padding: 6px 4px; overflow-wrap: anywhere; }
  #app .home .userinfo { height: auto; min-height: 54px; }
  #app .home .agent-profile-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  #app .home .agent-profile-row::before, #app .home .agent-profile-row::after { display: none; }
  #app .home .agent-profile-row > .el-col { width: auto; margin: 0; padding: 0 !important; }
  #app .home .agent-profile-row > .el-col:nth-last-child(-n+2) { grid-column: 1 / -1; }
  #app .home .agent-profile-row .userinfo { box-sizing: border-box; height: 100%; min-height: 0; margin: 0; padding: 10px 12px; }
  #app .home .agent-profile-row .home-recommend-auto { position: static; width: auto; margin: 0; padding: 0; line-height: 1.45; }
  #app .home .agent-profile-row > .el-col:nth-last-child(2) .home-recommend-auto { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; }
  #app .home .agent-profile-row > .el-col:last-child .flex { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 5px 10px; }
  #app .home .agent-profile-row > .el-col:last-child .green { white-space: nowrap; font-variant-numeric: tabular-nums; }
  #app .home .agent-profile-row .sbbtn { position: static; flex: 0 0 auto; width: auto; min-height: 44px; margin: 0; padding: 4px 14px; line-height: 1.3; }
  #app .home .el-card__header > div > .flex { flex-wrap: wrap; gap: 5px; margin-inline: 0 !important; }
  #app .home .seach { display: flex; min-width: 0; width: 100%; align-items: center; }
  #app .home .seach .el-date-editor { flex: 1 1 0; min-width: 0; }
  #app .home .std { display: flex; flex-wrap: wrap; }
  #app .home .std li { flex: 1 1 45%; }
  #app .home .chart { height: clamp(205px, 34dvh, 315px) !important; }
  #app .order-history { padding: 5px 12px 10px; }
  #app .xc-config-from .el-form-item { display: block; margin: 0 0 13px; width: auto; max-width: 100%; }
  #app .xc-config-from .el-form-item__label, .el-dialog .el-form-item__label { float: none; display: block; width: auto !important; text-align: left; line-height: 1.5; padding: 0 0 4px; white-space: normal; }
  #app .xc-config-from .el-form-item__content, .el-dialog .el-form-item__content { margin-left: 0 !important; min-width: 0; max-width: 100%; line-height: 1.65; }
  #app .xc-config-from .el-form-item__content > div, .el-dialog .el-form-item__content > div { max-width: 100%; min-width: 0 !important; }
  #app .xc-config-from .el-form-item__content > .flex, .el-dialog .el-form-item__content > .flex { flex-wrap: wrap; gap: 4px; }
  #app .xc-config-from :is(.el-input,.el-textarea,.el-select,.el-cascader,.el-input-number,.el-date-editor),
  .el-dialog :is(.el-input,.el-textarea,.el-select,.el-cascader,.el-date-editor) { max-width: 100%; min-width: 0; }
  #app .xc-config-from .el-input-group { display: inline-table; table-layout: fixed; width: 100%; }
  #app .el-input-group__append, #app .el-input-group__prepend { padding-inline: 7px; width: 2.6em; }
  #app .el-radio, #app .el-checkbox { margin: 3px 10px 3px 0; white-space: normal; }
  #app .careful, #app .el-form-item__content, #app .el-card__header, .el-dialog__body { overflow-wrap: anywhere; }
  #app .seachfrom .el-form, #app .seachfrom .flex, #app .el-card__header .clearfix, #app .seachfrom .seach { flex-wrap: wrap; align-items: center; gap: 4px; }
  #app .seachfrom .el-form--inline .el-form-item { display: inline-block; max-width: 100%; margin: 3px 5px 3px 0; vertical-align: bottom; }
  #app .el-button + .el-button, .el-dialog .el-button + .el-button { margin: 3px 0 3px 5px; }
  #app .xc-table-scroll { min-width: 0 !important; width: 100%; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  #app .xc-order-table { min-width: max(100%, 600px); }
  #app .el-table { width: 100% !important; max-width: 100%; }
  #app .el-table__body-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  #app .el-pagination { padding: 6px 0; display: flex; flex-wrap: wrap; align-items: center; white-space: normal; gap: 4px; }
  #app .el-pagination .el-pager { display: flex; max-width: 100%; overflow-x: auto; }
  #app .el-tabs__nav-wrap { max-width: 100%; }
  #app .addopbottom.mobile { left: 0; right: 0; width: auto; height: auto; max-height: 40dvh; overflow: auto; padding-bottom: env(safe-area-inset-bottom); }
  #app .addopbottom .cont { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 5px; height: auto; min-height: 44px; padding: 4px; }
  .el-dialog__wrapper { padding: 8px; box-sizing: border-box; }
  .el-dialog__wrapper .el-dialog { width: 100% !important; max-width: 560px; min-width: 0 !important; box-sizing: border-box; margin: max(6px,2dvh) auto !important; }
  .el-dialog .el-dialog__body { padding: 12px; min-width: 0; }
  .el-dialog__footer, .el-message-box__btns { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 4px; }
  .el-message-box, .el-message { width: calc(100vw - 24px) !important; min-width: 0 !important; max-width: 420px; box-sizing: border-box; }
  .el-picker-panel, .el-select-dropdown, .el-popover, .el-cascader__dropdown { max-width: calc(100vw - 12px); box-sizing: border-box; }
  .el-picker-panel__body-wrapper, .el-cascader-panel { overflow-x: auto; }
  #app .login { min-height: 100%; min-height: 100dvh; height: auto; overflow-y: auto; display: grid; align-items: center; }
  #app .login .login-weaper { position: relative; inset: auto; transform: none; margin: 12px auto; display: block; width: calc(100% - 24px); max-width: 420px; min-width: 0; height: auto; }
  #app .login .login-left { display: none; }
  #app .login .login-right, #app .login .login-main { display: block; min-width: 0; width: 100%; max-width: 100%; height: auto; position: relative; inset: auto; transform: none; box-sizing: border-box; }
  #app .login .login-right { padding: clamp(12px,4vw,24px); }
  #app .login .login-main { margin: 0; padding: 8px; }
  #app .login .login-code img { width: 100% !important; object-fit: contain; }
  #app .el-input__inner, #app textarea { max-width: 100%; }
  #app .xc-config-from img, .el-dialog img { max-width: 100%; height: auto; }
  #app .edui-editor, #app .edui-editor-iframeholder { max-width: 100%; box-sizing: border-box; }
}
@media (max-width: 380px), (max-height: 500px) and (max-width: 767px) {
  #app .login .login-title { margin: 4px 0 12px; }
  #app .el-card__body, #app .el-card__header { padding: 8px; }
}

@media (max-width: 767px) {
  #app .layout-backtop > .el-scrollbar { width: 100%; height: 100%; min-height: 0; }
  #app .layout-backtop > .el-scrollbar > .el-scrollbar__wrap > .el-scrollbar__view {
    height: 100%; min-height: 0; display: flex; flex-direction: column;
  }
  #app .layout-header { flex: none; }
  #app .layout-backtop .layout-main { flex: 1 1 auto; min-height: 0; }
}
@media (max-width: 767px) {
  #app .pgposter { max-width: 100%; overflow: hidden; pointer-events: none; }
  #app .pgposter canvas { max-width: 100%; }
  #app .xc-config-from .el-input-group { display: inline-flex; align-items: stretch; width: 100%; table-layout: auto; }
  #app .el-input-group > .el-input__inner { flex: 1 1 5em; width: 0; min-width: 0; }
  #app .el-input-group__append, #app .el-input-group__prepend { display: inline-flex; align-items: center; justify-content: center; flex: 0 1 auto; width: auto; min-width: 0; }
  #app .el-input-group__append > .el-button, #app .el-input-group__prepend > .el-button, #app .el-input-group__append > .el-select, #app .el-input-group__prepend > .el-select { margin: 0; }
  #app .seachfrom .el-input-group__prepend { flex: 0 0 auto; max-width: 50%; white-space: normal; }
  #app .seachfrom .el-input-group__prepend .el-input__inner { max-width: 100%; padding-left: 4px; padding-right: 18px; }
  #app .seachfrom .el-input-group__prepend .el-select { width: min(22vw, 100px) !important; min-width: 0 !important; }
  #app .seachfrom .el-input-group__prepend .el-input { width: 100% !important; }
  #app .seachfrom .el-col-14, #app .seachfrom .el-col-10 { width: 100%; margin-block: 3px; }
  #app .seachfrom .el-col-10 .el-button { min-height: 32px; }
}

.hq-enter-agent { margin-left: 9px; }
.hq-agent-workspace { position: fixed; inset: 0; z-index: 4500; display: flex; flex-direction: column; background: white; }
.hq-agent-workspace > header { flex: none; display: flex; align-items: center; gap: 16px; min-height: 45px; box-sizing: border-box; padding: 3px 14px; border-bottom: 1px solid #dcdfe6; color: #303133; }
.hq-agent-workspace > header button { padding: 6px 10px; min-height: 36px; border: 1px solid #b3d8ff; border-radius: 4px; color: #245c97; background: #ecf5ff; cursor: pointer; font: inherit; white-space: nowrap; }
.hq-agent-workspace > header span { min-width: 0; overflow-wrap: anywhere; }
.hq-agent-workspace > iframe { width: 100%; flex: 1 1 0; min-height: 0; border: 0; }
@media(max-width:767px){.hq-agent-workspace > header { gap: 9px; padding-inline: 8px; padding-top: max(3px,env(safe-area-inset-top)); } .hq-enter-agent { min-height: 32px; }}

.content-preview-dialog .el-dialog { max-width: calc(100vw - 20px); margin-bottom: 2vh; }
.content-preview-dialog .el-dialog__body { padding: 0; overflow: hidden; }
.content-preview-dialog .el-dialog__body > p,.content-preview-dialog .el-dialog__body > div { padding: 16px; }
.content-preview-dialog iframe { display:block; width:100%; height: min(70vh,710px); height: min(70dvh,710px); border:0; background:white; }
.content-preview-dialog .el-dialog__footer { padding: 8px 14px; }
.template-preview-trigger { margin-left: 8px; }
@media (max-width:767px) {
  .template-preview-trigger { margin: 4px 0 4px 6px; }
  .content-preview-dialog .el-dialog { width:calc(100vw - 16px)!important; }
  .pgposter { position:fixed!important; left:-10000px!important; top:0!important; pointer-events:none; }
}

.hq-template-options .el-select-dropdown__wrap { max-height: min(50vh, 340px); max-height: min(50dvh, 340px); }
@media (max-width: 767px) {
  .hq-content-actions .addopbottom .cont > div { flex-wrap:wrap; gap:3px; }
  .hq-content-actions .addopbottom .cont > div > div:last-child { display:flex; gap:6px; margin-left:auto; }
  .hq-content-actions .addopbottom .el-button { margin:0!important; }
  .hq-content-actions:has(.el-link) { min-height:90px; }
}
