/**
 * 管理后台壳层样式：顶部通栏菜单、页内顶栏、登录页背景。
 * 表单、表格、按钮等使用 Element UI 2 theme-chalk（见 layout 引入的 index.css）。
 */
:root {
    --eea-primary: #409eff;
    --eea-success: #67c23a;
    --eea-warning: #e6a23c;
    --eea-text: #303133;
    --eea-text-secondary: #606266;
    --eea-text-placeholder: #c0c4cc;
    --eea-border-light: #ebeef5;
    --eea-bg: #f0f2f5;
    --eea-sidebar-bg: #304156;
    --eea-sidebar-text: #bfcbd9;
    --eea-sidebar-active: #409eff;
    --eea-menu-hover: #263445;
    --eea-header-height: 50px;
    --eea-radius: 4px;
    --eea-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
    --eea-font: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB",
        "Microsoft YaHei", Arial, sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

/* ========== 登录页 ========== */
body.eea-login {
    margin: 0;
    min-height: 100vh;
    font-family: var(--eea-font);
    font-size: 14px;
    color: var(--eea-text);
    background: var(--eea-bg);
    background-image: linear-gradient(135deg, #e8f4ff 0%, var(--eea-bg) 45%, #f5f7fa 100%);
}

.eea-login__wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.eea-login-card {
    width: 100%;
    max-width: 420px;
}

.eea-login-card .el-card__header {
    padding: 35px 20px 12px;
    border-bottom: none;
}

.eea-login-card .el-card__body {
    padding: 10px 20px 28px;
}

.eea-login__brand {
    text-align: center;
}

/* 标识区 Logo：相对上一版再等比缩小至 80% */
.eea-login__logo-img {
    display: block;
    width: auto;
    max-width: min(100%, 166px);
    height: auto;
    max-height: 35.84px;
    margin: 0 auto;
    object-fit: contain;
}

.eea-login__alert {
    margin-bottom: 16px;
}

/* ========== 后台布局（顶部通栏菜单 + 内容区） ========== */
body.eea-layout {
    margin: 0;
    min-height: 100vh;
    font-family: var(--eea-font);
    font-size: 14px;
    color: var(--eea-text);
    background: var(--eea-bg);
}

.eea-app {
    display: flex;
    min-height: 100vh;
}

.eea-app--topnav {
    flex-direction: column;
}

/* 顶部通栏：品牌/用户 + 横向主导航 */
.eea-top-header {
    flex-shrink: 0;
    background: var(--eea-sidebar-bg);
    color: #fff;
    box-shadow: 0 1px 4px rgba(0, 21, 41, 0.12);
    z-index: 20;
}

.eea-top-header__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: var(--eea-header-height);
    padding: 0 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.eea-top-header__brand {
    display: flex;
    align-items: center;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.eea-sidebar__logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin-right: 10px;
    border-radius: var(--eea-radius);
    background: rgba(64, 158, 255, 0.25);
    color: var(--eea-primary);
    font-size: 14px;
    font-weight: 700;
}

.eea-top-header__right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.eea-top-header__welcome {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.88);
}

.eea-top-header .eea-top-header__user-tag.el-tag--primary {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.22);
    color: #fff;
}

.eea-top-header__logout {
    padding: 6px 10px;
    font-size: 13px;
    color: var(--eea-sidebar-text);
    text-decoration: none;
    border-radius: var(--eea-radius);
    transition: background 0.15s, color 0.15s;
}

.eea-top-header__logout:hover {
    background: var(--eea-menu-hover);
    color: #fff;
}

.eea-top-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    padding: 0 8px 0 12px;
    gap: 0;
}

.eea-top-nav__item {
    display: inline-flex;
    align-items: center;
    padding: 12px 16px;
    color: var(--eea-sidebar-text);
    text-decoration: none;
    font-size: 14px;
    transition: background 0.15s, color 0.15s;
    border-bottom: 3px solid transparent;
    margin-bottom: -1px;
}

.eea-top-nav__item:hover {
    background: var(--eea-menu-hover);
    color: #fff;
}

.eea-top-nav__item.is-active {
    background: var(--eea-menu-hover);
    color: var(--eea-sidebar-active);
    border-bottom-color: var(--eea-primary);
}

.eea-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
}

.eea-navbar {
    height: var(--eea-header-height);
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    box-shadow: var(--eea-shadow);
    z-index: 10;
}

.eea-navbar__left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.eea-navbar__title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--eea-text);
}

.eea-navbar__crumb {
    font-size: 13px;
    color: var(--eea-text-placeholder);
}

.eea-navbar__right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.eea-content {
    flex: 1;
    padding: 20px;
    overflow: auto;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}

/* 系统配置等：form 包裹 el-card 时，先保证表单与主内容区同宽 */
.eea-content > form.eea-form-settings {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

/* 主区域卡片、表格横向铺满（避免表格仅随内容缩在左侧；含 form 内嵌 el-card） */
.eea-content > .el-card,
.eea-content > form.eea-form-settings > .el-card {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.eea-content > .el-card > .el-card__body,
.eea-content > form.eea-form-settings > .el-card > .el-card__body {
    width: 100%;
    box-sizing: border-box;
}

/* 订单列表卡片、系统配置卡片：白色区域横向铺满主内容区 */
.eea-card-orders-full,
.eea-card-settings-full {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.eea-card-settings-full .el-card__body {
    width: 100%;
    box-sizing: border-box;
}

/* 系统配置、仓库等：表单项左右布局；表单在内容区内横向 100% */
.eea-form-settings {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.eea-form-settings .el-form-item {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    margin-bottom: 18px;
}

.eea-form-settings .el-form-item__label {
    flex: 0 0 120px;
    max-width: 120px;
    text-align: right;
    padding-right: 12px;
    line-height: 1.4;
    box-sizing: border-box;
    color: #606266;
    font-size: 14px;
    margin: 0;
}

.eea-form-settings .el-form-item__content {
    flex: 1 1 auto;
    min-width: 0;
    margin-left: 0;
    line-height: 32px;
}

.eea-form-settings .el-input,
.eea-form-settings .el-form-item__content .el-input {
    width: 100%;
    max-width: 100%;
}

.eea-form-settings__label-spacer {
    display: block;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

.eea-form-settings__submit {
    margin-bottom: 0;
}

/* 仓库管理 */
.eea-warehouse-page-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 12px;
}

.eea-warehouse-table-wrap {
    width: 100%;
    overflow-x: auto;
    box-sizing: border-box;
    -webkit-overflow-scrolling: touch;
}

.eea-warehouse-list-card .el-card__body {
    padding: 0;
}

.eea-warehouse-cell-addr {
    max-width: 320px;
    white-space: normal;
    word-break: break-all;
    line-height: 1.45;
}

.eea-warehouse-empty {
    text-align: center;
    color: #909399;
    padding: 16px 0;
}

.eea-warehouse-actions {
    white-space: nowrap;
}

.eea-inline-delete-form {
    display: inline;
    margin: 0;
    padding: 0;
    vertical-align: middle;
}

.eea-warehouse-form .eea-warehouse-form-hint {
    margin: 0 0 16px;
    font-size: 13px;
    color: #909399;
    line-height: 1.5;
    max-width: 720px;
}

.eea-warehouse-form .eea-warehouse-form-item--textarea,
.eea-warehouse-form .eea-warehouse-form-item--check {
    align-items: flex-start;
}

.eea-warehouse-form .eea-warehouse-form-item--textarea .el-form-item__label {
    padding-top: 6px;
}

.eea-warehouse-check-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    line-height: 32px;
    font-size: 14px;
    color: #606266;
    cursor: pointer;
    user-select: none;
}

.eea-form-settings.eea-warehouse-form .el-form-item.eea-warehouse-form-item--region {
    align-items: flex-start;
}

.eea-warehouse-form .eea-warehouse-form-item--region .el-form-item__label {
    padding-top: 6px;
}

/* 与 Element 中 input 的 width:100% 区分，三个 select 必须同一行横排 */
.eea-warehouse-region-selects {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px 10px;
    width: 100%;
    max-width: 720px;
    box-sizing: border-box;
}

.eea-warehouse-form select.eea-warehouse-region-select,
.eea-warehouse-form .eea-warehouse-region-select.el-input__inner {
    flex: 1 1 0;
    min-width: 0;
    width: auto !important;
    max-width: none;
    height: 32px;
    line-height: 32px;
    box-sizing: border-box;
    padding: 0 8px;
}

@media (max-width: 640px) {
    .eea-warehouse-region-selects {
        flex-wrap: wrap;
    }
    .eea-warehouse-form select.eea-warehouse-region-select,
    .eea-warehouse-form .eea-warehouse-region-select.el-input__inner {
        flex: 1 1 100%;
        min-width: 140px;
    }
}

.eea-warehouse-region-hint {
    margin: 6px 0 0;
    font-size: 12px;
    color: #909399;
    line-height: 1.45;
    max-width: 640px;
}

.eea-warehouse-region-hint.is-error {
    color: #f56c6c;
}

.eea-warehouse-regions-alert code {
    font-size: 12px;
    background: #fafafa;
    padding: 0 4px;
    border-radius: 2px;
}

.eea-content-flash {
    margin-bottom: 16px;
}

/* ========== 概览统计卡片内布局 ========== */
.eea-stat {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.eea-stat__icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.eea-stat__icon--blue {
    background: #ecf5ff;
    color: var(--eea-primary);
}

.eea-stat__icon--green {
    background: #f0f9eb;
    color: var(--eea-success);
}

.eea-stat__icon--orange {
    background: #fdf6ec;
    color: var(--eea-warning);
}

.eea-stat__body {
    flex: 1;
    min-width: 0;
}

.eea-stat__label {
    font-size: 13px;
    color: var(--eea-text-secondary);
    margin-bottom: 6px;
}

.eea-stat__value {
    font-size: 24px;
    font-weight: 600;
    color: var(--eea-text);
    line-height: 1.2;
}

.eea-stat__hint {
    margin-top: 6px;
    font-size: 12px;
    color: var(--eea-text-placeholder);
}

/* ========== 订单列表：展开行与子表 ========== */

/* 主表 + 子表：字号加大（Element small 默认约 12px） */
.eea-card-orders-full .eea-table-orders--single .el-table__cell .cell,
.eea-sub-inner .eea-sub-table-wrap .el-table__cell .cell {
    font-size: 14px;
    line-height: 1.55;
}

/* 子单表：订单详情～商家确认收货列居中（静态 table 需显式样式） */
.eea-sub-inner .eea-sub-table-wrap .eea-table-unified th.is-center,
.eea-sub-inner .eea-sub-table-wrap .eea-table-unified td.is-center {
    text-align: center;
}

.eea-sub-inner .eea-sub-table-wrap .eea-table-unified th.is-center .cell {
    text-align: center;
}

.eea-sub-inner .eea-sub-table-wrap .eea-table-unified td.is-center .cell {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    text-align: center;
}

/* 主单表：单表 thead + tbody + colgroup，避免 Element 官方「表头/表体双 table」在 PHP 静态页下列宽错位 */
.eea-table-orders--single {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.eea-table-orders--single.el-table {
    flex: none !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 100%;
    display: block;
}

.eea-card-orders-full .eea-table-orders--single.el-table {
    width: 100% !important;
    min-width: 100%;
}

.eea-table-orders--single .el-table__body-wrapper {
    width: 100% !important;
    max-width: none !important;
    min-width: 100%;
    display: block;
}

.eea-table-orders--single .eea-table-unified {
    width: 100% !important;
    min-width: 100%;
    max-width: none !important;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0;
}

.eea-table-orders--single .eea-table-unified thead .el-table__cell {
    background-color: #fff;
}

/* 四列比例之和为 100%，随容器拉伸 */
.eea-table-orders--single col.eea-col-order-no {
    width: 30%;
}

.eea-table-orders--single col.eea-col-subcnt {
    width: 12%;
}

.eea-table-orders--single col.eea-col-time {
    width: 46%;
}

.eea-table-orders--single col.eea-col-actions {
    width: 12%;
    min-width: 72px;
}

.eea-table-orders--single .eea-th-actions {
    text-align: right !important;
}

/* 展开行内子单表：与主表同宽 100% */
.eea-tr-sub > .el-table__cell {
    width: 100%;
    padding: 0 !important;
    background: #fafbfc;
}

.eea-tr-sub > .el-table__cell > .cell {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding-left: 0;
    padding-right: 0;
}

.eea-sub-inner {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 8px 4px 12px;
    overflow-x: auto;
}

.eea-sub-table-wrap.el-table {
    flex: none !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 100%;
    display: block;
}

.eea-sub-inner .eea-sub-table-wrap .el-table__body-wrapper {
    width: 100% !important;
    max-width: none !important;
    min-width: 100%;
    display: block;
}

.eea-sub-inner .eea-sub-table-wrap .eea-table-unified {
    width: max-content !important;
    min-width: 100%;
    max-width: none !important;
    table-layout: auto;
    border-collapse: separate;
    border-spacing: 0;
}

/* 子表：ID 收窄；爱回收子单号列最小宽度略缩小，整表可横向滚动 */
.eea-sub-inner .eea-sub-table-wrap .eea-sub-col-id {
    width: 64px;
}

.eea-sub-inner .eea-sub-table-wrap .eea-sub-col-ahs {
    min-width: 200px;
}

.eea-sub-col-optype {
    min-width: 120px;
}

.eea-sub-col-status {
    min-width: 100px;
}

.eea-sub-col-rtime {
    min-width: 160px;
}

.eea-sub-col-actions {
    width: 200px;
    min-width: 200px;
    max-width: 200px;
}

.eea-sub-inner .eea-sub-table-wrap .js-sub-order-action-select {
    width: 200px !important;
    max-width: 200px !important;
    box-sizing: border-box;
}

.eea-sub-action-cell {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    min-width: 0;
    text-align: left;
}

/* 暂时隐藏：与下拉重复的触发按钮行；保留 DOM，下拉 change 仍通过 querySelector + .click() 执行，勿删 HTML */
.eea-sub-inner .eea-sub-table-wrap .eea-sub-action-triggers,
.eea-sub-inner .eea-sub-table-wrap .eea-sub-action-triggers .el-button {
    display: none !important;
}

.eea-sub-json-mask,
.eea-private-number-mask,
.eea-express-sync-mask,
.eea-express-deliver-mask,
.eea-express-receipt-mask,
.eea-return-deliver-mask {
    z-index: 2050;
}

.eea-dialog--sub-json {
    max-width: min(96vw, 720px);
    width: min(96vw, 720px);
    height: 520px;
    max-height: min(88vh, 520px);
    min-height: 0;
    overflow: hidden;
}

.eea-dialog--sub-json .eea-sub-json-dialog-body.eea-dialog__body--json {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.eea-dialog--sub-json .eea-sub-json-dialog-body .eea-order-detail-json-pre {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow-y: auto;
}

.eea-dialog--sub-json .eea-sub-json-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.eea-dialog--sub-json .eea-sub-json-footer__left {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.eea-dialog--sub-json .eea-sub-json-footer__right {
    flex-shrink: 0;
}

/* Element UI .el-button 会设 display，盖过 [hidden]；必须强制隐藏 */
.eea-dialog--sub-json #eea-sub-json-refresh-priv[hidden] {
    display: none !important;
}

.eea-dialog--sub-json #eea-sub-json-refresh-pickup[hidden] {
    display: none !important;
}

.eea-dialog--sub-json #eea-sub-json-refresh-return-query[hidden] {
    display: none !important;
}

/* 取货信息弹窗内不展示「获取商家退货信息」（与商家退货查询弹窗共用 footer 时防止误显） */
.eea-dialog--sub-json.eea-sub-json--mode-pickup #eea-sub-json-refresh-return-query {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

.eea-dialog--private-number {
    max-width: min(96vw, 440px);
    width: min(96vw, 440px);
}

.eea-dialog--express-sync {
    max-width: min(96vw, 480px);
    width: min(96vw, 480px);
}

.eea-dialog--return-deliver {
    max-width: min(96vw, 480px);
    width: min(96vw, 480px);
}

/* 同步物流取件：避免 body 被 flex 压扁导致最后一行与页脚错位；内容区可滚动 */
.eea-dialog--express-sync .eea-dialog__body.eea-express-sync-form-only {
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1 1 auto;
    min-height: 0;
    max-height: min(82vh, 560px);
}

/* 商家退货发出：与上面同级，在固定高度弹窗内占满标题与页脚间区域并 Y 滚动 */
.eea-dialog--return-deliver .eea-dialog__body.eea-express-sync-form-only {
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
}

.eea-dialog--express-sync .eea-express-sync-form-only .eea-priv-field {
    flex-shrink: 0;
}

/* 同步物流：已获取取货/虚拟号只读区，固定高度、内容溢出纵向滚动 */
.eea-express-sync-prereq,
.eea-return-deliver-prereq {
    margin-top: 12px;
    flex-shrink: 0;
}

.eea-express-sync-prereq-title {
    margin: 0 0 8px;
    font-size: 13px;
    color: #606266;
    font-weight: 600;
}

.eea-express-sync-prereq-label {
    margin: 8px 0 4px;
    font-size: 12px;
    color: #909399;
}

.eea-express-sync-prereq-label:first-of-type {
    margin-top: 0;
}

.eea-express-sync-prereq-scroll {
    max-height: 220px;
    overflow-x: auto;
    overflow-y: auto;
    padding: 8px 10px;
    box-sizing: border-box;
    border: 1px solid #ebeef5;
    border-radius: 4px;
    background: #fafafa;
}

.eea-express-sync-prereq-pre {
    margin: 0 0 4px;
    padding: 0;
    font-family: ui-monospace, Menlo, Consolas, monospace;
    font-size: 12px;
    line-height: 1.45;
    white-space: pre-wrap;
    word-break: break-word;
}

.eea-express-sync-form-only textarea.eea-express-sync-remark {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    min-height: 72px;
    padding: 8px 10px;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
    resize: vertical;
    border: 1px solid var(--eea-border-light, #dcdfe6);
    border-radius: 4px;
}

/* 系统配置 / 测试京东快递下单：整体固定高度，仅中间表单区纵向滚动 */
.eea-dialog--jd-test {
    max-width: min(96vw, 560px);
    width: min(96vw, 560px);
    height: min(88vh, 520px);
    max-height: min(88vh, 520px);
}
.eea-dialog--jd-test .eea-dialog__header {
    flex-shrink: 0;
}
.eea-dialog--jd-test .eea-dialog__body.eea-jd-test-dialog {
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1 1 auto;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
}

/* JD 快递订单：查看反馈，整块 JSON 在可滚动主体内 */
.eea-dialog--jd-feedback {
    max-width: min(96vw, 900px);
    width: min(96vw, 900px);
    height: min(88vh, 640px);
    max-height: min(88vh, 640px);
}
.eea-dialog--jd-feedback .eea-dialog__header {
    flex-shrink: 0;
}
/* 须高于通用 .eea-dialog__body{overflow:hidden}，否则只能看到首段 JSON、下方不滚动 */
.eea-dialog--jd-feedback .eea-dialog__body.eea-jd-feedback-dialog-body {
    display: block;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1 1 auto;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
    padding: 12px 16px 8px;
}
.eea-jd-feedback-block {
    margin-bottom: 16px;
    flex-shrink: 0;
}
.eea-jd-feedback-block__title {
    font-size: 13px;
    font-weight: 600;
    color: var(--eea-text, #303133);
    margin: 0 0 6px;
    padding: 0 2px;
}
.eea-jd-feedback-block pre.eea-jd-feedback-pre {
    margin: 0;
    padding: 10px 12px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 12px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
    background: #f5f7fa;
    border: 1px solid var(--eea-border-light, #ebeef5);
    border-radius: 4px;
    box-sizing: border-box;
}

.eea-dialog--express-deliver {
    max-width: min(96vw, 560px);
    width: min(96vw, 560px);
}

/* 用户发货：内容区可纵向滚动，避免被 .eea-dialog__body 的 overflow:hidden 裁切且无滚动条 */
.eea-dialog--express-deliver .eea-dialog__body.eea-express-deliver-body {
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1 1 auto;
    min-height: 0;
    max-height: min(82vh, 680px);
    -webkit-overflow-scrolling: touch;
}

.eea-dialog--express-deliver .eea-express-deliver-body .eea-priv-field,
.eea-dialog--express-deliver .eea-express-deliver-body .eea-deliver-region-row,
.eea-dialog--express-deliver .eea-express-deliver-body .eea-express-deliver-section-title,
.eea-dialog--express-deliver .eea-express-deliver-body .eea-express-deliver-region-hint {
    flex-shrink: 0;
}

.eea-express-deliver-section-title {
    margin: 4px 0 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--eea-text, #303133);
}

.eea-deliver-region-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-end;
}

.eea-deliver-region-item {
    flex: 1 1 140px;
    min-width: 120px;
}

.eea-deliver-region-item .el-form-item__label {
    font-size: 12px;
    margin-bottom: 6px;
}

.eea-deliver-region-item .el-input__inner {
    width: 100%;
    box-sizing: border-box;
}

.eea-dialog--express-receipt {
    max-width: min(96vw, 440px);
    width: min(96vw, 440px);
}

.eea-express-deliver-region-hint {
    margin: 0 0 8px;
    font-size: 12px;
    color: var(--eea-text-placeholder, #909399);
    line-height: 1.45;
}

.eea-express-sync-body {
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-sizing: border-box;
}

.eea-express-sync-hint {
    margin: 0 0 4px;
    font-size: 12px;
    color: #e6a23c;
    line-height: 1.4;
}

.eea-express-sync-body .eea-priv-field .el-input__inner {
    width: 100%;
    box-sizing: border-box;
}

.eea-private-number-body {
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.eea-priv-field .el-form-item__label {
    display: block;
    font-size: 12px;
    margin-bottom: 6px;
    color: var(--eea-text-regular, #606266);
}

.eea-priv-field .el-input__inner {
    width: 100%;
    box-sizing: border-box;
}

/* 用户发货前并行请求取货/虚拟号时的全屏 Loading */
.eea-page-loading-mask {
    position: fixed;
    inset: 0;
    z-index: 5000;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}
.eea-page-loading-mask[hidden] {
    display: none !important;
}
.eea-page-loading__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 28px 36px;
    max-width: 90vw;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}
.eea-page-loading__spinner {
    width: 42px;
    height: 42px;
    box-sizing: border-box;
    border: 3px solid #e4e7ed;
    border-top-color: #409eff;
    border-radius: 50%;
    animation: eea-page-loading-spin 0.75s linear infinite;
}
@keyframes eea-page-loading-spin {
    to {
        transform: rotate(360deg);
    }
}
.eea-page-loading__label {
    font-size: 14px;
    color: #606266;
    text-align: center;
    line-height: 1.5;
    max-width: 300px;
}

.eea-dialog-mask {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}

.eea-dialog-mask[hidden] {
    display: none !important;
}

/* 任务 JSON 弹窗叠在「订单任务」弹窗之上 */
.eea-task-query-detail-mask {
    z-index: 2100;
}

/* 提交审核表单叠在「审核资料」之上 */
.eea-audit-submit-mask {
    z-index: 2200;
}

.eea-dialog--audit-submit {
    max-width: min(96vw, 440px);
}

.eea-inspection-report-mask {
    z-index: 2300;
}

.eea-dialog--inspection-report {
    max-width: min(96vw, 720px);
    width: min(96vw, 720px);
    max-height: min(92vh, 720px);
    min-height: 0;
    overflow: hidden;
}

/* 表单区占满标题与底部按钮之间的剩余高度 + 纵向滚动（覆盖 .eea-dialog__body 的 overflow:hidden） */
.eea-dialog--inspection-report .eea-inspection-report-body.eea-dialog__body {
    flex: 1 1 auto;
    min-height: 0;
    max-height: min(65vh, 540px);
    overflow-y: auto !important;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding: 10px 14px !important;
    display: block;
}

.eea-insp-unit-inline {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
    width: fit-content;
    max-width: 100%;
}

/* 单价：固定窄宽度，与「获取单价」同排；在栅格列内比整行输入约少 80px+ 的占位 */
.eea-dialog--inspection-report .eea-insp-form--small .eea-insp-unit-inline .el-input__inner.eea-insp-unit-yuan-input {
    width: 80px !important;
    min-width: 0 !important;
    max-width: 80px !important;
    flex: 0 0 80px;
    box-sizing: border-box;
}

.eea-dialog--inspection-report .eea-insp-form--small .eea-insp-unit-inline .el-button {
    flex-shrink: 0;
}

.eea-inspection-report-footer {
    flex-shrink: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.eea-inspection-history-mask {
    z-index: 2350;
}

.eea-dialog--inspection-history {
    max-width: min(96vw, 720px);
    width: min(96vw, 720px);
    height: 520px;
    max-height: min(88vh, 520px);
    min-height: 0;
    overflow: hidden;
}

.eea-dialog--inspection-history .eea-inspection-history-body.eea-dialog__body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px 14px !important;
}

.eea-insp-history-section {
    flex: 1 1 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--eea-border-light, #dcdfe6);
    border-radius: 4px;
    overflow: hidden;
    background: #fff;
}

.eea-insp-history-label {
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 8px;
    background: #f0f2f5;
    color: #303133;
    border-bottom: 1px solid var(--eea-border-light, #dcdfe6);
}

.eea-insp-history-pre {
    flex: 1 1 auto;
    min-height: 0;
    margin: 0;
    padding: 8px 10px;
    overflow: auto;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 12px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
    background: #fafafa;
}

.eea-inspection-history-footer {
    flex-shrink: 0;
}

/* small 尺寸：与 Element el-form-item small 接近 */
.eea-insp-form--small .el-form-item__label {
    font-size: 12px;
    line-height: 1.35;
    margin-bottom: 4px;
    padding: 0;
    color: var(--eea-text-regular, #606266);
}

.eea-insp-form--small .el-input__inner,
.eea-insp-form--small .eea-insp-select {
    height: 28px;
    line-height: 28px;
    font-size: 12px;
    padding: 0 8px;
    box-sizing: border-box;
}

.eea-insp-form--small .eea-insp-select {
    padding-right: 24px;
}

.eea-insp-form--small .el-textarea__inner {
    width: 100%;
    box-sizing: border-box;
    font-size: 12px;
    padding: 5px 8px;
    min-height: 44px;
    line-height: 1.45;
}

.eea-insp-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 12px;
    margin-bottom: 10px;
}

.eea-insp-grid > .eea-insp-field {
    min-width: 0;
}

.eea-insp-field--full {
    grid-column: 1 / -1;
}

/* 与「结算克重」同一行右侧占位，使「报价总额」与结算克重对齐 */
.eea-insp-field--grid-spacer {
    pointer-events: none;
    user-select: none;
}

.eea-insp-field--grid-spacer .el-form-item__label,
.eea-insp-field--grid-spacer .el-input__inner {
    opacity: 0;
}

.eea-insp-amount-total[readonly] {
    background: #f5f7fa;
    color: #606266;
    cursor: default;
}

.eea-insp-detail-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
    flex-wrap: wrap;
    gap: 6px;
    flex-shrink: 0;
}

.eea-insp-detail-title {
    font-weight: 500;
    font-size: 13px;
}

.eea-insp-detail-table-wrap {
    overflow-x: auto;
    overflow-y: visible;
    border: 1px solid var(--eea-border-light);
    border-radius: 4px;
    max-width: 100%;
}

.eea-insp-detail-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.eea-insp-detail-table th,
.eea-insp-detail-table td {
    border-bottom: 1px solid var(--eea-border-light);
    padding: 6px 6px;
    text-align: left;
    vertical-align: top;
    position: relative;
}

.eea-insp-detail-table th {
    background: #fafafa;
    font-size: 12px;
    font-weight: 500;
}

.eea-insp-detail-table .el-input__inner {
    height: 28px;
    line-height: 28px;
    font-size: 12px;
    padding: 0 6px;
    box-sizing: border-box;
}

/* 质检明细：隐藏原生 file，由可点击区域 + 缩略图展示 */
.eea-insp-detail-table input[type="file"].eea-insp-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

.eea-insp-upload-box {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-width: 160px;
}

.eea-insp-upload-zone {
    width: 100%;
    aspect-ratio: 9 / 16;
    min-height: 0;
    border: 1px dashed var(--eea-border-light, #dcdfe6);
    border-radius: 4px;
    background: #fafafa;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    box-sizing: border-box;
    overflow: hidden;
    outline: none;
}

.eea-insp-upload-zone:focus-visible {
    border-color: var(--eea-color-primary, #409eff);
    box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.2);
}

.eea-insp-upload-placeholder {
    font-size: 12px;
    color: #909399;
    text-align: center;
    padding: 8px;
    line-height: 1.4;
    user-select: none;
}

.eea-insp-thumb {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.eea-insp-thumb[hidden] {
    display: none !important;
}

/* 与弹窗主标题「审核资料」同款：复用 .eea-dialog__header */
.eea-audit-result-section {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    border-top: 1px solid var(--eea-border-light);
}

.eea-audit-result-section__header {
    background: #fff;
}

.eea-audit-result-json-pre {
    flex: 1;
    min-height: 140px;
    max-height: min(44vh, 400px);
}

/* 审核资料：商品图区域距 dialog 内容区（body，无额外 padding）顶/左各 10px */
.eea-audit-product-images-section {
    flex-shrink: 0;
    margin-bottom: 12px;
    padding: 10px 0 12px 10px;
    border-bottom: 1px solid var(--eea-border-light);
    box-sizing: border-box;
}

.eea-audit-product-images-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-start;
}

.eea-audit-product-thumb {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid var(--eea-border-light);
    cursor: zoom-in;
    background: #f5f7fa;
    flex-shrink: 0;
}

.eea-audit-product-thumb:focus {
    outline: 2px solid #409eff;
    outline-offset: 2px;
}

.eea-audit-image-lightbox {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    box-sizing: border-box;
    background: rgba(0, 0, 0, 0.85);
    cursor: zoom-out;
}

.eea-audit-image-lightbox[hidden] {
    display: none !important;
}

.eea-audit-image-lightbox__img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    cursor: default;
    border-radius: 4px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.45);
}

.eea-audit-image-lightbox__close {
    position: absolute;
    top: 16px;
    right: 20px;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    z-index: 1;
}

.eea-audit-image-lightbox__close:hover {
    background: rgba(255, 255, 255, 0.22);
}

.eea-dialog {
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

/* 覆盖上一段 max-height，否则「商家退货发出」无法保持固定高度 */
.eea-dialog.eea-dialog--return-deliver {
    height: min(88vh, 560px);
    max-height: min(88vh, 560px);
}

/* 任务列表：加宽容器，便于多列表格横向滚动 */
.eea-dialog--task {
    max-width: min(96vw, 1120px);
    width: min(96vw, 1120px);
}

.eea-dialog--order-detail {
    max-width: min(96vw, 920px);
    width: min(96vw, 920px);
}

.eea-dialog__body--json {
    flex: 1;
    min-height: 0;
    padding: 0 !important;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.eea-order-detail-json-pre {
    margin: 0;
    padding: 14px 16px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 12px;
    line-height: 1.55;
    white-space: pre-wrap;
    word-break: break-word;
    overflow: auto;
    flex: 1;
    min-height: 220px;
    max-height: min(52vh, 480px);
    box-sizing: border-box;
    background: #282c34;
    color: #abb2bf;
    border: none;
    border-radius: 0;
    tab-size: 2;
}

.eea-dialog__footer {
    padding: 12px 16px;
    border-top: 1px solid var(--eea-border-light);
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    background: #fff;
}

.eea-dialog__header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--eea-border-light);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 16px;
    font-weight: 500;
}

.eea-dialog__sub {
    font-size: 13px;
    font-weight: 400;
    color: var(--eea-text-placeholder);
}

.eea-dialog__body {
    padding: 12px 16px;
    overflow: hidden;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

#eea-task-dialog .eea-dialog__body {
    overflow: hidden;
}

/* 订单任务弹窗：独立表格，避免复用 el-table__* 与 Element 样式冲突 */
.eea-task-table-scroll {
    overflow: auto;
    flex: 1;
    min-height: 0;
    max-height: min(60vh, 520px);
    border: 1px solid var(--eea-border-light);
    border-radius: 4px;
    background: #fff;
    -webkit-overflow-scrolling: touch;
}

table.eea-task-table {
    width: max-content;
    min-width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    table-layout: auto;
    font-size: 13px;
    line-height: 1.45;
    color: var(--eea-text-secondary);
}

.eea-task-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f5f7fa;
    font-weight: 600;
    white-space: nowrap;
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--eea-border-light);
    border-right: 1px solid #ebeef5;
    box-shadow: 0 1px 0 var(--eea-border-light);
}

.eea-task-table thead th:last-child {
    border-right: none;
}

.eea-task-table tbody td {
    padding: 8px 12px;
    vertical-align: top;
    border-bottom: 1px solid #ebeef5;
    border-right: 1px solid #ebeef5;
    word-break: break-word;
    white-space: normal;
    max-width: 320px;
}

.eea-task-table tbody td:last-child {
    border-right: none;
}

.eea-task-table tbody tr:last-child td {
    border-bottom: none;
}

.eea-task-table tbody tr:nth-child(even) {
    background-color: #fafbfc;
}

.eea-sub-inner .eea-sub-table-wrap .eea-table-unified th:nth-child(1),
.eea-sub-inner .eea-sub-table-wrap .eea-table-unified td:nth-child(1) {
    width: 64px;
    max-width: 64px;
    box-sizing: border-box;
}

.eea-sub-inner .eea-sub-table-wrap .eea-table-unified th:nth-child(2) .cell,
.eea-sub-inner .eea-sub-table-wrap .eea-table-unified td:nth-child(2) .cell {
    white-space: nowrap;
}

.eea-tr-sub[hidden] {
    display: none !important;
}

.eea-text-mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 14px;
}

.eea-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* 主单汇总行：整行点击展开/收起子单明细 */
.eea-table-orders--single .eea-table-unified tbody tr.eea-sub-main-row {
    cursor: pointer;
}

.eea-table-orders--single .eea-table-unified tbody tr.eea-sub-main-row:hover {
    background-color: #f5f7fa;
}

/* 子单展开/收起：单 span 文案由 JS 切换，避免与 Element .el-button span 的 display 冲突 */
.eea-btn-sub-toggle {
    display: inline-flex !important;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.eea-btn-sub-toggle.is-open .eea-sub-toggle-icon {
    transform: rotate(180deg);
}

.eea-btn-sub-toggle .eea-sub-toggle-icon {
    transition: transform 0.2s ease;
    display: inline-block;
    flex-shrink: 0;
}

.eea-panel-meta {
    margin-left: 10px;
    font-size: 13px;
    font-weight: 400;
    color: var(--eea-text-placeholder);
}

.eea-pager {
    padding: 12px 16px;
    border-top: 1px solid var(--eea-border-light);
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

/* 分页：PHP 渲染的页码链接接入 el-pager */
.el-pager li.number > a {
    display: block;
    height: 100%;
    min-width: 100%;
    padding: 0 4px;
    color: inherit;
    text-decoration: none;
    text-align: center;
    font-size: 13px;
    line-height: 28px;
    box-sizing: border-box;
}

.el-pager li.number > a:hover {
    color: #409eff;
}

.el-pager li.number.active span {
    display: inline-block;
    min-width: 28px;
    line-height: 28px;
    text-align: center;
    font-size: 13px;
}

/* 首页欢迎区（概览） */
.eea-welcome-page {
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-height: min(560px, calc(100vh - 200px));
    padding: clamp(16px, 4vw, 40px);
    margin: 0;
    background: #fcfcfc;
    border-radius: var(--eea-radius);
    border: 1px solid rgba(235, 238, 245, 0.95);
}

.eea-welcome-page__inner {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: clamp(24px, 5vw, 56px);
    width: 100%;
    max-width: 1040px;
    margin: 0 auto;
}

.eea-welcome-page__text {
    flex: 1 1 280px;
    min-width: 0;
}

.eea-welcome-page__title {
    margin: 0 0 12px;
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 600;
    color: var(--eea-text);
    letter-spacing: 0.02em;
    line-height: 1.2;
}

.eea-welcome-page__subtitle {
    margin: 0;
    font-size: clamp(15px, 2vw, 18px);
    color: var(--eea-text-secondary);
    line-height: 1.6;
}

.eea-welcome-page__figure {
    flex: 1 1 300px;
    max-width: min(100%, 440px);
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.eea-welcome-page__img {
    width: 100%;
    height: auto;
    max-width: 440px;
    display: block;
    user-select: none;
    pointer-events: none;
}

@media (max-width: 768px) {
    .eea-content {
        padding: 12px;
    }

    .eea-welcome-page {
        min-height: unset;
        margin: 0;
    }

    .eea-welcome-page__inner {
        flex-direction: column;
        text-align: center;
    }

    .eea-welcome-page__text {
        order: 1;
    }

    .eea-welcome-page__figure {
        order: 2;
        max-width: 100%;
    }
}
