/* 推广中心（自研分销） */
.agent-page {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background-color: #fff;
    width: 100%;
}

.agent-page .topBar {
    position: relative;
}

.agent-page .btn-tixian {
    position: absolute;
    right: 12px;
    top: 10px;
    height: 30px;
    padding: 0 14px;
    line-height: 30px;
    font-size: 13px;
}

.agent-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 16px;
}

.agent-card {
    flex: 1;
    min-width: 130px;
    border: 1px solid #ebeef5;
    border-radius: 6px;
    padding: 14px 12px;
    background: #fafcff;
}

.agent-card .card-title {
    font-size: 13px;
    color: #909399;
    margin-bottom: 8px;
}

.agent-card .card-value {
    font-size: 22px;
    font-weight: 600;
    color: #303133;
}

.agent-invite {
    margin: 0 16px 16px;
    border: 1px solid #ebeef5;
    border-radius: 6px;
    padding: 14px;
    background: #fff;
}

.agent-invite .invite-row {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.agent-invite .invite-label {
    width: 90px;
    font-size: 14px;
    color: #606266;
}

.agent-invite .invite-code {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 2px;
    color: #3b8cfe;
    margin-right: 10px;
}

.agent-invite .invite-input {
    flex: 1;
    min-width: 220px;
    height: 34px;
    line-height: 34px;
    margin-right: 10px;
    font-size: 13px;
}

.agent-invite .invite-tip {
    font-size: 12px;
    color: #909399;
    line-height: 1.8;
}

.agent-invite .invite-tip.warn {
    color: #e6a23c;
}

.agent-tabs {
    display: flex;
    border-bottom: 1px solid #ebeef5;
    padding: 0 16px;
}

.agent-tab {
    padding: 10px 18px;
    font-size: 14px;
    color: #606266;
    cursor: pointer;
    border-bottom: 2px solid transparent;
}

.agent-tab.active {
    color: #3b8cfe;
    border-bottom-color: #3b8cfe;
}

.agent-panel {
    padding: 12px 16px;
    overflow-x: auto;
}

.agent-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.agent-table th,
.agent-table td {
    border: 1px solid #ebeef5;
    padding: 8px 10px;
    text-align: center;
    color: #606266;
    white-space: nowrap;
}

.agent-table th {
    background: #f5f7fa;
    color: #303133;
    font-weight: 600;
}

.agent-table td.money {
    color: #f56c6c;
    font-weight: 600;
}

.agent-table td.empty {
    color: #909399;
    padding: 30px 0;
}

.agent-pager {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 12px 16px 20px;
    font-size: 13px;
    color: #606266;
}

.hidden {
    display: none !important;
}

.span-btn-red {
    border: none;
    background: #fef0f0;
    color: #f56c6c;
    border: 1px solid #fbc4c4;
    border-radius: 4px;
    padding: 3px 10px;
    cursor: pointer;
    font-size: 12px;
}

/* 分站表单 */
.site-form .form-row {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.site-form .form-row label {
    width: 100px;
    font-size: 14px;
    color: #606266;
}

.site-form .form-row .el-input__inner,
.site-form .form-row .el-textarea__inner {
    flex: 1;
    min-width: 220px;
    height: 34px;
    line-height: 1.4;
    padding: 0 10px;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    font-size: 13px;
}

.site-form .form-row .el-textarea__inner {
    height: auto;
    padding: 6px 10px;
}

.site-form .form-tip,
.agent-modal .form-tip {
    font-size: 12px;
    color: #909399;
    margin-top: 4px;
    line-height: 1.8;
}

.no-site p {
    font-size: 14px;
    color: #909399;
    padding: 20px 0;
}

/* 加价规则编辑器 */
.mk-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 6px;
}

.mk-row .mk-sel,
.mk-row .mk-sel2,
.mk-row .mk-id,
.mk-row .mk-val {
    flex: none;
    height: 30px;
    line-height: 30px;
    padding: 0 6px;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    font-size: 12px;
    color: #606266;
    background: #fff;
}

.mk-row .mk-sel {
    min-width: 150px;
    max-width: 200px;
}

.mk-row .mk-sel2 {
    width: 110px;
}

.mk-row .mk-id {
    width: 90px;
}

.mk-row .mk-val {
    width: 90px;
}

.mk-row .mk-name {
    font-size: 12px;
    color: #909399;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mk-row .mk-del,
#btn-mk-cate,
#btn-mk-search {
    height: 30px;
    line-height: 28px;
    padding: 0 10px;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    background: #fff;
    color: #606266;
    font-size: 12px;
    cursor: pointer;
}

.mk-row .mk-del {
    color: #f56c6c;
    border-color: #fbc4c4;
}

.mk-empty {
    font-size: 12px;
    color: #c0c4cc;
    padding: 2px 0 6px;
}

#mk-result .mk-pick {
    display: inline-block;
    margin: 2px 6px 2px 0;
    color: #3b8cfe;
    font-size: 12px;
}

/* 提现弹窗 */
.agent-modal {
    position: fixed;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, .45);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.agent-modal-box {
    width: 440px;
    max-width: 94%;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
}

.agent-modal-title {
    position: relative;
    padding: 14px 18px;
    font-size: 16px;
    font-weight: 600;
    border-bottom: 1px solid #ebeef5;
}

.agent-modal-title .modal-close {
    position: absolute;
    right: 10px;
    top: 8px;
    border: none;
    background: none;
    font-size: 22px;
    color: #909399;
    cursor: pointer;
}

.agent-modal-body {
    padding: 16px 18px;
}

.agent-modal .form-row {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.agent-modal .form-row label {
    width: 90px;
    font-size: 14px;
    color: #606266;
}

.agent-modal .form-row .el-input__inner {
    flex: 1;
    height: 34px;
    padding: 0 10px;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    font-size: 13px;
}

.agent-modal .modal-money {
    font-size: 18px;
    font-weight: 600;
    color: #f56c6c;
}

.agent-modal-foot {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 12px 18px;
    border-top: 1px solid #ebeef5;
    background: #fafafa;
}

.agent-modal-foot .el-button {
    height: 32px;
    padding: 0 16px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 13px;
}

@media (max-width: 768px) {
    .agent-cards {
        gap: 8px;
        padding: 10px;
    }

    .agent-card {
        min-width: 45%;
    }

    .agent-tabs {
        overflow-x: auto;
    }
}


/* ---------------- 顶级合伙人 · 下级分站 ---------------- */
.subsite-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 18px;
}

.subsite-cards .agent-card {
    flex: 1;
    min-width: 160px;
    margin: 0;
}

.ss-inline {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.ss-kv {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #4b5563;
    white-space: nowrap;
}

.ss-num {
    flex: none;
    width: 92px;
}

.ss-long {
    max-width: 420px;
}

.ss-sep {
    color: #8a94a6;
    font-size: 15px;
}

.ss-unit {
    font-size: 13px;
    color: #8a94a6;
    line-height: 34px;
}

.ss-table-wrap {
    margin-top: 18px;
    overflow-x: auto;
}

@media (max-width: 768px) {
    .ss-inline { gap: 8px; }
    .ss-long { max-width: 100%; }
    .subsite-cards .agent-card { min-width: 45%; }
}


/* ---------------- 自绘下拉框（替代原生 select 的系统蓝底样式） ---------------- */
.ss-select {
    position: relative;
    flex: none;
    min-width: 220px;
}

.ss-select.is-open { z-index: 60; }

.ss-select .ov-select-btn {
    position: relative;
    width: 100%;
    height: 40px;
    padding: 0 38px 0 14px;
    border: 1px solid #dcdfe5;
    border-radius: 20px;
    background: #fff;
    color: #333;
    font-size: 14px;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    transition: background-color .2s, border-color .2s;
}

.ss-select .ov-select-btn:hover { background: #fafbfc; border-color: #c9d4f5; }

.ss-select .ov-select-btn::after {
    content: "";
    position: absolute;
    right: 16px;
    top: 50%;
    width: 7px;
    height: 7px;
    margin-top: -5px;
    border-right: 1.8px solid #9aa4b8;
    border-bottom: 1.8px solid #9aa4b8;
    transform: rotate(45deg);
    transition: transform .2s;
    pointer-events: none;
}

.ss-select.is-open .ov-select-btn::after { transform: rotate(-135deg); margin-top: -2px; }

.ss-select .ov-select-text { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.ss-select .ov-select-list {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 46px;
    max-height: 210px;
    overflow-y: auto;
    padding: 6px;
    border: 1px solid #e9eef7;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(16,24,40,.14);
    z-index: 60;
}

.ss-select.is-open .ov-select-list { display: block; }

.ss-select .ov-select-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 9px 12px;
    border-radius: 8px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
}

.ss-select .ov-select-item:hover { background: #f6f8fc; }

.ss-select .ov-select-item.is-selected { background: #f6f8fc; font-weight: 600; }

.ss-select .ov-select-item.is-selected::after {
    content: "\2713";
    font-size: 13px;
    font-weight: 700;
    color: #12b76a;
}
