* {
    box-sizing: border-box
}

html, body {
    margin: 0;
    padding: 0
}

body {
    background: #f4f6f8;
    color: #333;
    font-family: "Microsoft YaHei", Arial, sans-serif;
    font-size: 14px
}

a {
    text-decoration: none;
    color: inherit
}

.trade-maxw {
    width: 1200px;
    max-width: calc(100% - 32px);
    margin: 0 auto
}

.trade-crumb {
    height: 60px;
    padding-top: 22px;
    color: #999
}

.trade-crumb a:hover {
    color: #2e5ec0
}

.trade-panel {
    margin-bottom: 24px;
    background: #fff;
    border-radius: 3px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .04)
}

.trade-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 58px;
    padding: 0 20px;
    border-bottom: 1px solid #eee
}

.trade-panel-head h1 {
    margin: 0;
    font-size: 18px;
    font-weight: 500
}

.trade-primary, .trade-button {
    display: inline-block;
    min-width: 86px;
    height: 36px;
    padding: 0 16px;
    border: 1px solid #d8dce5;
    border-radius: 2px;
    background: #fff;
    color: #555;
    line-height: 34px;
    text-align: center;
    cursor: pointer
}

.trade-primary {
    border-color: #2e5ec0;
    background: #2e5ec0;
    color: #fff
}

.trade-primary:hover {
    color: #FFF;
    opacity: 0.7;
    text-decoration: none;
}

.trade-button:hover {
    border-color: #2e5ec0;
    color: #2e5ec0
}

.trade-button:disabled, .trade-primary:disabled {
    cursor: not-allowed;
    border-color: #ddd;
    background: #eee;
    color: #aaa
}

.trade-message {
    display: none;
    position: fixed;
    z-index: 2100;
    top: 25px;
    left: 50%;
    max-width: 520px;
    transform: translateX(-50%);
    padding: 12px 24px;
    border-radius: 3px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, .12)
}

.trade-message.ok {
    display: block;
    background: #f0f9eb;
    color: #529b2e
}

.trade-message.error {
    display: block;
    background: #fef0f0;
    color: #e43f3f
}

.trade-filter {
    display: flex;
    min-height: 310px;
    border-bottom: 1px solid #eee
}

.trade-filter-main {
    width: 600px;
    padding: 18px 20px
}

.trade-filter-cover {
    flex: 1;
    min-height: 310px;
    background: #eef3fb
}

.trade-filter-cover img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 310px;
    object-fit: cover
}

.trade-category-title, .trade-other-title {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    color: #555
}

.trade-category-title:before, .trade-other-title:before {
    content: "";
    width: 4px;
    height: 15px;
    margin-right: 8px;
    background: #2e5ec0
}

.trade-category-list {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    min-height: 72px;
    margin-bottom: 14px
}

.trade-category-list button {
    height: 30px;
    padding: 0 13px;
    border: 1px solid transparent;
    border-radius: 2px;
    background: #f5f7fa;
    color: #555;
    cursor: pointer
}

.trade-category-list button.active, .trade-category-list button:hover {
    border-color: #2e5ec0;
    background: #2e5ec0;
    color: #fff
}

.trade-filter-grid {
    display: grid;
    grid-template-columns:1fr 1fr;
    gap: 11px 18px
}

.trade-field {
    display: flex;
    align-items: center;
    min-width: 0
}

.trade-field > label {
    flex: 0 0 86px;
    color: #666;
    text-align: right;
    margin-right: 9px;
    font-weight: normal
}

.trade-field input, .trade-field select {
    min-width: 0;
    height: 34px;
    padding: 5px 8px;
    border: 1px solid #dcdfe6;
    border-radius: 2px;
    background: #fff
}

.trade-field .wide {
    width: 175px
}

.trade-field .range {
    width: 78px
}

.trade-field .dash {
    padding: 0 5px;
    color: #aaa
}

.trade-field.full {
    grid-column: 1/-1
}

.trade-region {
    display: flex;
    gap: 6px
}

.trade-region select {
    width: 104px
}

.trade-filter-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 15px
}

.trade-sortbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 48px;
    padding: 0 20px;
    background: #fff;
    border-bottom: 1px solid #eee;
    color: #777
}

.trade-sort-buttons button {
    height: 30px;
    padding: 0 12px;
    border: 1px solid #d8dce5;
    background: #fff;
    cursor: pointer
}

.trade-sort-buttons button.active {
    border-color: #2e5ec0;
    color: #2e5ec0
}

.trade-empty {
    padding: 80px 20px;
    text-align: center;
    color: #999
}

.trade-pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 82px;
    padding: 18px
}

.trade-pager .summary {
    margin-right: 12px;
    color: #666
}

.trade-pager .summary strong {
    color: #be2525
}

.trade-pager button {
    min-width: 38px;
    height: 34px;
    border: 1px solid #d8dce5;
    background: #fff;
    color: #555;
    cursor: pointer
}

.trade-pager button.active {
    border-color: #2e5ec0;
    background: #2e5ec0;
    color: #fff
}

.trade-pager button:disabled {
    cursor: not-allowed;
    background: #f5f5f5;
    color: #bbb
}

.supply-grid {
    display: grid;
    grid-template-columns:repeat(4, 1fr);
    gap: 14px;
    padding: 18px
}

.supply-card {
    overflow: hidden;
    border: 1px solid #e6e6e6;
    background: #fff;
    transition: .2s
}

.supply-card:hover {
    box-shadow: 0 3px 14px rgba(0, 0, 0, .14);
    transform: translateY(-2px)
}

.supply-cover {
    position: relative;
    height: 178px;
    padding: 10px;
    background: #fafafa
}

.supply-cover img {
    width: 100%;
    height: 100%;
    object-fit: contain
}

.trade-badge {
    position: absolute;
    z-index: 2;
    top: 10px;
    left: 10px;
    padding: 4px 8px;
    background: #2e5ec0;
    color: #fff;
    font-size: 12px
}

.trade-badge.urgent {
    left: auto;
    right: 10px;
    background: #ec554c
}

.supply-body {
    padding: 12px 14px
}

.supply-title {
    overflow: hidden;
    height: 24px;
    margin-bottom: 7px;
    font-size: 16px;
    font-weight: 600;
    line-height: 24px;
    text-overflow: ellipsis;
    white-space: nowrap
}

.supply-price {
    margin-bottom: 8px;
    color: #ec554c;
    font-size: 17px
}

.supply-line {
    display: flex;
    height: 24px;
    line-height: 24px;
    color: #777
}

.supply-line span:first-child {
    flex: 0 0 68px;
    color: #999
}

.supply-line em {
    overflow: hidden;
    font-style: normal;
    text-overflow: ellipsis;
    white-space: nowrap
}

.supply-actions {
    display: flex;
    gap: 8px;
    padding: 0 14px 14px
}

.supply-actions a {
    flex: 1
}

.demand-list {
    padding: 14px 18px
}

.demand-card {
    position: relative;
    margin-bottom: 12px;
    border: 1px solid #e6e6e6;
    border-left: 5px solid #2e5ec0;
    background: #fff
}

.demand-card:hover {
    box-shadow: 0 2px 10px rgba(0, 0, 0, .1)
}

.demand-main {
    display: flex;
    align-items: center;
    padding: 18px 20px
}

.demand-title {
    width: 190px
}

.demand-title strong {
    display: block;
    overflow: hidden;
    margin-bottom: 7px;
    font-size: 17px;
    text-overflow: ellipsis;
    white-space: nowrap
}

.demand-title span {
    color: #999
}

.demand-price {
    width: 230px;
    color: #ec554c;
    font-size: 18px
}

.demand-stats {
    display: grid;
    grid-template-columns:repeat(3, 150px);
    flex: 1;
    color: #666
}

.demand-stats span {
    display: block;
    color: #999;
    font-size: 12px;
    margin-bottom: 5px
}

.demand-actions {
    display: flex;
    width: 190px;
    gap: 8px
}

.demand-actions a {
    min-width: 80px
}

.detail-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 26px;
    border-bottom: 1px solid #eee
}

.detail-head h1 {
    margin: 0 0 7px;
    font-size: 22px
}

.detail-no {
    color: #999
}

.status-badges {
    display: flex;
    align-items: center;
    gap: 7px
}

.status-badges span {
    display: inline-block;
    padding: 5px 11px;
    border-radius: 2px;
    background: #eef3fb;
    color: #2e5ec0
}

.status-badges .trade-favorite {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    height: auto;
    padding: 5px 11px;
    border: 0;
    border-radius: 2px;
    /*background: #eef3fb;*/
    color: #2e5ec0;
    font-size: 14px;
    line-height: normal
}

.status-badges .trade-favorite:hover {
    border: 0;
    background: #e2ebfa;
    color: #2e5ec0
}

.status-badges .trade-favorite:disabled {
    border: 0;
    background: #eef3fb;
    color: #8aa5d6;
    opacity: .8
}

.status-badges .trade-favorite[hidden] {
    display: none
}

.detail-content {
    display: flex;
    padding: 24px 26px
}

.detail-media {
    flex: 0 0 390px;
    min-width: 0;
    margin-right: 30px;
    background: #fafafa;
    border: 1px solid #eee
}

.detail-media > img {
    width: 100%;
    height: 290px;
    object-fit: contain
}

.detail-carousel-main {
    position: relative;
    height: 238px;
    background: #fafafa
}

.detail-carousel-main > img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain
}

.detail-carousel-arrow {
    display: none;
    position: absolute;
    z-index: 2;
    top: 50%;
    width: 34px;
    height: 52px;
    transform: translateY(-50%);
    border: 0;
    background: rgba(0, 0, 0, .38);
    color: #fff;
    font-size: 34px;
    line-height: 46px;
    cursor: pointer
}

.detail-carousel-arrow:hover {
    background: rgba(0, 0, 0, .58)
}

.detail-carousel-arrow.prev {
    left: 8px
}

.detail-carousel-arrow.next {
    right: 8px
}

.detail-carousel-counter {
    position: absolute;
    right: 9px;
    bottom: 8px;
    padding: 3px 8px;
    border-radius: 10px;
    background: rgba(0, 0, 0, .52);
    color: #fff;
    font-size: 12px
}

.detail-carousel-thumbs {
    display: flex;
    height: 66px;
    gap: 7px;
    padding: 8px;
    overflow-x: auto;
    border-top: 1px solid #eee;
    background: #fff
}

.detail-carousel-thumb {
    flex: 0 0 64px;
    width: 64px;
    height: 48px;
    padding: 0;
    border: 2px solid transparent;
    background: #f5f5f5;
    cursor: pointer
}

.detail-carousel-thumb.active {
    border-color: #2e5ec0
}

.detail-carousel-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover
}

.detail-summary {
    display: grid;
    grid-template-columns:repeat(2, 1fr);
    flex: 1;
    align-content: start
}

.detail-cell {
    min-height: 62px;
    padding: 9px 12px;
    border-bottom: 1px dashed #e5e5e5
}

.detail-cell label {
    display: block;
    margin-bottom: 7px;
    color: #999
}

.detail-cell strong {
    font-size: 16px;
    font-weight: 500
}

.detail-cell.price strong {
    color: #ec554c;
    font-size: 20px
}

.detail-section {
    padding: 0 26px 25px
}

.detail-section h2 {
    margin: 0 0 14px;
    padding-left: 10px;
    border-left: 4px solid #2e5ec0;
    font-size: 17px
}

.detail-table, .data-table {
    width: 100%;
    border-collapse: collapse
}

.detail-table th, .detail-table td, .data-table th, .data-table td {
    padding: 12px 9px;
    border: 1px solid #e7e7e7;
    text-align: center
}

.detail-table th, .data-table th {
    background: #fafafa;
    color: #666;
    font-weight: 500
}

.detail-remarks {
    min-height: 70px;
    padding: 14px;
    background: #fafafa;
    line-height: 24px;
    color: #666;
    white-space: pre-wrap
}

.detail-bottom {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 20px 26px;
    border-top: 1px solid #eee
}

.trade-favorite.active {
    border-color: #e6a23c;
    background: #fff8e6;
    color: #b77700
}

.status-badges .trade-favorite.active:hover,
.status-badges .trade-favorite.active:disabled {
    border: 0;
    background: #fff3d2;
    color: #b77700
}

.trade-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    inset: 0;
    background: rgba(0, 0, 0, .48)
}

.trade-modal.show {
    display: block
}

.trade-modal-box {
    width: 600px;
    max-width: calc(100% - 32px);
    max-height: 84vh;
    margin: 7vh auto;
    padding: 24px;
    overflow: auto;
    border-radius: 4px;
    background: #fff
}

.trade-modal-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    cursor: move;
    user-select: none;
    touch-action: none
}

.trade-modal-title h3 {
    margin: 0;
    font-size: 19px
}

.trade-modal-close {
    border: 0;
    background: none;
    color: #999;
    font-size: 25px;
    cursor: pointer
}

html.trade-modal-dragging,
html.trade-modal-dragging * {
    cursor: move !important;
    user-select: none !important
}

.modal-grid {
    display: grid;
    grid-template-columns:1fr 1fr;
    gap: 14px 18px
}

.modal-field label {
    display: block;
    margin-bottom: 7px;
    color: #666
}

.modal-field label.required::before {
    content: "*";
    margin-right: 4px;
    color: #e54b4b;
    font-weight: 700
}

.modal-field input, .modal-field textarea, .modal-field select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #dcdfe6;
    border-radius: 2px
}

.modal-field textarea {
    min-height: 70px;
    resize: vertical
}

.modal-field.full {
    grid-column: 1/-1
}

.delivery-modal-box {
    width: 720px
}

.modal-field input[readonly] {
    background: #f5f7fa;
    color: #606266;
    cursor: not-allowed
}

.delivery-file-input {
    position: absolute;
    width: 1px !important;
    height: 1px;
    padding: 0 !important;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0 !important
}

.delivery-upload-field {
    display: flex;
    gap: 14px;
    min-height: 112px;
    padding: 12px;
    border: 1px dashed #ccd3df;
    border-radius: 4px;
    background: #fafbfc
}

.delivery-upload-button {
    display: flex;
    flex: 0 0 138px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 88px;
    border: 1px solid #d8dee8;
    border-radius: 4px;
    background: #fff;
    color: #2672d8;
    cursor: pointer
}

/* 上传入口也是 label，需要提高优先级覆盖 .modal-field label 的通用表单样式。 */
.modal-field .delivery-upload-button {
    display: flex;
    margin-bottom: 0;
    color: #2672d8
}

.modal-field .delivery-upload-button.video {
    color: #7b61c9
}

.delivery-upload-button span {
    font-size: 25px;
    line-height: 24px
}

.delivery-upload-button strong {
    font-size: 14px;
    font-weight: 500
}

.delivery-upload-button small {
    color: #999;
    font-size: 11px
}

.delivery-upload-button.video {
    color: #7b61c9
}

.delivery-upload-content {
    flex: 1;
    min-width: 0
}

.delivery-upload-content p {
    margin: 2px 0 10px;
    color: #888;
    font-size: 12px
}

.delivery-preview-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px
}

.delivery-preview-item {
    position: relative;
    width: 72px;
    height: 72px;
    overflow: hidden;
    border: 1px solid #e1e5eb;
    border-radius: 4px;
    background: #fff
}

.delivery-preview-item img,
.delivery-preview-item video {
    width: 100%;
    height: 100%;
    object-fit: cover
}

.delivery-preview-remove {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 20px;
    height: 20px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, .58);
    color: #fff;
    line-height: 20px;
    cursor: pointer
}

.quote-receive-region {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px
}

.quote-receive-region select {
    min-width: 0
}

@media (max-width: 700px) {
    .quote-receive-region {
        grid-template-columns: 1fr
    }

    .delivery-upload-field {
        flex-direction: column
    }

    .delivery-upload-button {
        flex-basis: auto
    }
}

.modal-tip {
    padding: 10px 12px;
    background: #f5f7fa;
    color: #777
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 9px;
    margin-top: 20px
}

.personal-shell {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    width: 1200px;
    max-width: calc(100% - 32px);
    margin: 20px auto 40px
}

.personal-menu {
    flex: 0 0 220px;
    min-height: 650px;
    background: #fff
}

.personal-content {
    flex: 1;
    min-width: 0;
    background: #fff;
    min-height: 650px
}

.personal-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 62px;
    padding: 0 20px;
    border-bottom: 1px solid #eee
}

.personal-title h1 {
    margin: 0;
    font-size: 19px
}

.type-tabs button {
    height: 34px;
    padding: 0 16px;
    border: 1px solid #ddd;
    background: #fff;
    cursor: pointer
}

.type-tabs button.active {
    border-color: #2e5ec0;
    background: #2e5ec0;
    color: #fff
}

.table-wrap {
    padding: 18px
}

.table-actions button, .table-actions a {
    display: inline-block;
    margin: 2px;
    min-width: 58px;
    height: 30px;
    padding: 0 9px;
    border: 1px solid #d8dce5;
    background: #fff;
    color: #555;
    line-height: 28px;
    cursor: pointer
}

.table-actions .primary {
    border-color: #2e5ec0;
    background: #2e5ec0;
    color: #fff
}

.quote-summary {
    display: grid;
    grid-template-columns:1fr 1fr;
    gap: 20px;
    padding: 30px
}

.quote-summary-card {
    padding: 28px;
    border: 1px solid #e3e7ee;
    border-radius: 4px
}

.quote-summary-card h2 {
    margin: 0 0 12px;
    font-size: 18px
}

.quote-summary-card strong {
    display: block;
    margin-bottom: 20px;
    color: #2e5ec0;
    font-size: 36px
}

.footerCss {
    display: block;
    background: #fff
}

.compat-message {
    padding: 80px;
    text-align: center;
    color: #777
}

@media (max-width: 1000px) {
    .trade-filter-cover {
        display: none
    }

    .trade-filter-main {
        width: 100%
    }

    .supply-grid {
        grid-template-columns:repeat(3, 1fr)
    }

    .demand-stats {
        grid-template-columns:repeat(2, 120px)
    }

    .personal-shell {
        display: block
    }

    .personal-menu {
        display: none
    }

    .detail-content {
        display: block
    }

    .detail-media {
        width: 100%;
        margin: 0 0 20px
    }

    .trade-maxw, .personal-shell {
        max-width: calc(100% - 20px)
    }
}

@media (max-width: 720px) {
    .trade-filter-grid {
        grid-template-columns:1fr
    }

    .trade-field.full {
        grid-column: auto
    }

    .supply-grid {
        grid-template-columns:1fr
    }

    .demand-main {
        display: block
    }

    .demand-title, .demand-price, .demand-actions {
        width: auto;
        margin-bottom: 13px
    }

    .demand-stats {
        grid-template-columns:repeat(2, 1fr);
        margin-bottom: 14px
    }

    .detail-summary {
        grid-template-columns:1fr
    }

    .modal-grid {
        grid-template-columns:1fr
    }

    .modal-field.full {
        grid-column: auto
    }

    .table-wrap {
        overflow: auto
    }
}

.detail-carousel-main > video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000
}

.detail-carousel.single .detail-carousel-main {
    height: 290px
}

.detail-carousel-thumb.video {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    background: #20242b;
    color: #fff
}

.detail-carousel-thumb.video span {
    font-size: 18px
}

.detail-carousel-thumb.video small {
    font-size: 11px
}

.cattle-info-list {
    width: 100%
}

.cattle-info-loading {
    padding: 48px 20px;
    border: 1px solid #e1e1e1;
    text-align: center;
    color: #999
}

.cattle-info-card {
    border-top: 1px solid #d9d9d9;
    border-left: 1px solid #d9d9d9;
    background: #fff
}

.cattle-info-card + .cattle-info-card {
    margin-top: 18px
}

.cattle-info-title {
    height: 42px;
    padding: 0 18px;
    border-right: 1px solid #d9d9d9;
    border-bottom: 1px solid #d9d9d9;
    background: #fafafa;
    font-size: 15px;
    font-weight: 600;
    line-height: 42px
}

.cattle-info-title span {
    margin-left: 12px;
    color: #777;
    font-weight: 400
}

.cattle-info-grid {
    display: grid;
    grid-template-columns:repeat(4, minmax(0, 1fr))
}

.cattle-info-cell {
    display: flex;
    align-items: center;
    min-width: 0;
    min-height: 65px;
    padding: 8px 18px;
    border-right: 1px solid #d9d9d9;
    border-bottom: 1px solid #d9d9d9
}

.cattle-info-icon {
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    margin-right: 13px
}

.cattle-info-text {
    min-width: 0
}

.cattle-info-text span {
    display: block;
    overflow: hidden;
    margin-bottom: 5px;
    color: #999;
    text-overflow: ellipsis;
    white-space: nowrap
}

.cattle-info-text strong {
    display: block;
    overflow: hidden;
    color: #333;
    font-size: 14px;
    font-weight: 400;
    text-overflow: ellipsis;
    white-space: nowrap
}

.cattle-info-cell.remarks {
    grid-column: span 2
}

.cattle-info-cell.remarks .cattle-info-text strong {
    white-space: normal;
    word-break: break-word
}

@media (max-width: 1000px) {
    .cattle-info-grid {
        grid-template-columns:repeat(2, minmax(0, 1fr))
    }
}

@media (max-width: 620px) {
    .cattle-info-grid {
        grid-template-columns:1fr
    }

    .cattle-info-cell.remarks {
        grid-column: auto
    }
}
