*{box-sizing:border-box}body{margin:0;background:#f4f7fb;color:#1d2939;font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif}aside{position:fixed;inset:0 auto 0 0;width:240px;background:#101828;color:#fff;padding:28px 18px}aside h1{margin:0}aside p{color:#98a2b3}nav{display:grid;gap:8px;margin-top:28px}nav button{border:0;background:transparent;color:#d0d5dd;padding:12px;border-radius:9px;text-align:left}nav button.on,nav button:hover{background:#1d2939;color:#fff}main{margin-left:240px;padding:28px 34px}header{display:flex;justify-content:space-between;align-items:center}header a{background:#fff;border:1px solid #ddd;padding:9px 14px;border-radius:8px;text-decoration:none;color:#344054}.page{display:none}.page.on{display:block}.cards{display:grid;grid-template-columns:repeat(4,1fr);gap:18px;margin-top:22px}.cards>div,.panel{background:#fff;padding:22px;border-radius:15px;box-shadow:0 10px 28px rgba(16,24,40,.07);margin-top:18px}.cards span{color:#667085}.cards b{display:block;font-size:34px;margin-top:12px}.panel form{display:grid;grid-template-columns:1fr 1fr;gap:12px}.panel input,.panel select,.panel textarea{padding:11px;border:1px solid #dfe3ea;border-radius:8px}.panel textarea{grid-column:1/-1;min-height:130px}.panel button{background:#2563eb;color:#fff;border:0;border-radius:8px;padding:10px 15px;cursor:pointer}table{width:100%;border-collapse:collapse}th,td{text-align:left;padding:12px;border-bottom:1px solid #e4e7ec;font-size:13px}.tag{display:inline-block;padding:4px 8px;border-radius:999px;background:#eff4ff;color:#3538cd}.bad{background:#fff1f0;color:#b42318}.good{background:#ecfdf3;color:#027a48}#toast{position:fixed;right:25px;bottom:25px;background:#101828;color:#fff;padding:13px 17px;border-radius:8px;display:none}


/* v34 lead action ui */
#leadRows th:nth-child(4),
#leadRows td:nth-child(4){
  width: 320px;
}

#leadRows th:last-child,
#leadRows td:last-child{
  width: 300px;
}

.contact-cell{
  max-width: 320px;
  line-height: 1.6;
  white-space: normal;
  word-break: break-word;
}

.action-row{
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
}

.action-row button{
  padding: 8px 12px;
  white-space: nowrap;
  border-radius: 10px;
}


/* v34 modal */

.modal{
display:none;
position:fixed;
top:0;
left:0;
width:100%;
height:100%;
background:rgba(0,0,0,.35);
z-index:999;
align-items:center;
justify-content:center;
}


.modal-box{
background:white;
width:520px;
max-width:90%;
border-radius:18px;
padding:30px;
box-shadow:0 20px 60px rgba(0,0,0,.2);
}


.modal-box h3{
font-size:22px;
margin-bottom:20px;
}


.modal-actions{
text-align:right;
margin-top:25px;
}


.modal-actions button{
padding:10px 25px;
border-radius:10px;
}


.modal input,
.modal textarea,
.modal select{
width:100%;
padding:12px;
margin:8px 0;
border:1px solid #ddd;
border-radius:8px;
}



/* V34 CRM Modal */

.modal{
    display:none;
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.35);
    z-index:9999;
    align-items:center;
    justify-content:center;
}


.modal-box{
    width:520px;
    max-width:90%;
    background:#fff;
    border-radius:18px;
    padding:30px;
    box-shadow:0 20px 60px rgba(0,0,0,.25);
}


.modal-box h3{
    margin:0 0 20px;
    font-size:22px;
}


.modal-content-row{
    margin:12px 0;
    line-height:1.6;
}


.modal input,
.modal textarea,
.modal select{
    width:100%;
    box-sizing:border-box;
    padding:12px;
    border:1px solid #ddd;
    border-radius:10px;
    margin-top:8px;
}


.modal textarea{
    height:120px;
}


.modal-actions{
    margin-top:25px;
    text-align:right;
}


.modal-actions button{
    padding:10px 22px;
    border-radius:10px;
    cursor:pointer;
}




/* ===== V34.1 Lead Table UI ===== */


#leadRows td{
    vertical-align:middle;
}


#leadRows td:nth-child(1){
    width:240px;
    max-width:240px;
}


#leadRows td:nth-child(2){
    width:70px;
    text-align:center;
}


#leadRows td:nth-child(3){
    width:100px;
}


.contact-cell{
    width:260px;
    max-width:260px;
    line-height:1.7;
    word-break:break-word;
}


#leadRows td:nth-child(5){
    width:60px;
    text-align:center;
}


#leadRows td:nth-child(6){
    width:100px;
    text-align:center;
    white-space:nowrap;
}


#leadRows td:nth-child(7){
    width:100px;
    text-align:center;
    white-space:nowrap;
}



.action-row{
    display:flex;
    gap:8px;
    justify-content:center;
    align-items:center;
    white-space:nowrap;
}


.action-row button{
    padding:8px 14px;
    border-radius:10px;
    font-size:14px;
}




#leadRows td:nth-child(6){
    color:#2563eb;
    font-weight:600;
}




/* V34.2 fix dropdown */

.action-row{
    position:relative;
}


.more-menu{
    position:relative;
}


.menu-panel{
    display:none;
    position:absolute;
    bottom:45px;
    right:0;
    width:160px;
    background:#ffffff;
    border-radius:12px;
    padding:8px;
    box-shadow:0 8px 25px rgba(0,0,0,.18);
    z-index:9999;
}


.menu-panel button{
    display:block;
    width:100%;
    margin:4px 0;
    background:#ffffff;
    color:#1f2937;
    border-radius:8px;
    padding:10px;
    text-align:left;
    border:none;
}


.menu-panel button:hover{
    background:#f3f4f6;
}



.modal-field{
    margin-bottom:18px;
}

.modal-field label{
    display:block;
    font-weight:600;
    margin-bottom:8px;
    color:#1f2937;
}

.modal-field textarea,
.modal-field input{
    width:100%;
    padding:14px;
    border:1px solid #d1d5db;
    border-radius:12px;
    font-size:16px;
    box-sizing:border-box;
}

.primary-btn{
    background:#2563eb;
    color:white;
    border:none;
    padding:12px 24px;
    border-radius:10px;
    cursor:pointer;
}

.primary-btn:hover{
    background:#1d4ed8;
}


.contact-cell{
    max-height:80px;
    overflow:hidden;
    display:block;
}


/* 客户二次分配 checkbox 优化 */
#selectAllTransfer,
.transferCustomer{
    width:18px;
    height:18px;
    cursor:pointer;
    vertical-align:middle;
}

#selectAllTransfer{
    margin-right:8px;
}

.transferCustomer{
    margin:0;
}

#selectAllTransfer + span{
    vertical-align:middle;
}


/* 二次分配表格优化 */
#selectAllTransfer,
.transferCustomer{
    width:16px;
    height:16px;
}

#selectAllTransfer{
    margin-right:6px;
}

.transferCustomer{
    display:block;
    margin:auto;
}

#selectAllTransfer{
    vertical-align:middle;
}

th:first-child,
td:first-child{
    text-align:center;
    width:70px;
}


/* 全选列防止换行 */
#selectAllTransfer{
    flex-shrink:0;
}

th:first-child{
    white-space:nowrap;
    width:90px;
}


/* 客户二次分配表格优化 */

.transferCustomer{
    width:16px;
    height:16px;
}

th:nth-child(2),
td:nth-child(2){
    min-width:220px;
    max-width:260px;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}

th:nth-child(3),
td:nth-child(3){
    width:90px;
    min-width:90px;
    white-space:nowrap;
    text-align:center;
}

th:nth-child(4),
td:nth-child(4){
    min-width:220px;
    white-space:nowrap;
}


/* 二次分配弹窗优化 */

.modal table{
    width:100%;
    table-layout:fixed;
}

.modal th,
.modal td{
    vertical-align:middle;
    padding:14px 10px;
}


.modal th:first-child,
.modal td:first-child{
    width:90px;
    text-align:center;
}


.modal th:nth-child(2),
.modal td:nth-child(2){
    width:38%;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}


.modal th:nth-child(3),
.modal td:nth-child(3){
    width:80px;
    text-align:center;
    white-space:nowrap;
}


.modal th:nth-child(4),
.modal td:nth-child(4){
    width:35%;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}


.modal input[type="checkbox"]{
    width:18px;
    height:18px;
    vertical-align:middle;
}




/* 客户转移记录表 */
#transferRows td,
#transferRows th{
    white-space:nowrap;
    padding:14px 18px;
}

#transferRows td:nth-child(1),
#transferRows th:nth-child(1){
    min-width:220px;
}

#transferRows td:nth-child(2),
#transferRows th:nth-child(2){
    min-width:120px;
}

#transferRows td:nth-child(3),
#transferRows th:nth-child(3){
    min-width:120px;
}

#transferRows td:nth-child(4),
#transferRows th:nth-child(4){
    min-width:100px;
}

#transferRows td:nth-child(5),
#transferRows th:nth-child(5){
    min-width:180px;
}


/* 客户转移记录完整显示 */
#transferLogs table{
    width:100%;
    table-layout:auto;
}

#transferLogs .panel{
    overflow-x:auto;
}

#transferLogs th,
#transferLogs td{
    white-space:nowrap;
    padding:14px 20px;
}

#transferLogs th:nth-child(1),
#transferLogs td:nth-child(1){
    min-width:220px;
}

#transferLogs th:nth-child(2),
#transferLogs td:nth-child(2){
    min-width:120px;
}

#transferLogs th:nth-child(3),
#transferLogs td:nth-child(3){
    min-width:120px;
}

#transferLogs th:nth-child(4),
#transferLogs td:nth-child(4){
    min-width:100px;
}

#transferLogs th:nth-child(5),
#transferLogs td:nth-child(5){
    min-width:180px;
}


/* 客户转移记录 - 第一列客户名称修复 */
#transferLogs th:first-child,
#transferLogs td:first-child{
    width:220px;
    min-width:220px;
    text-align:left;
    white-space:nowrap;
}




/* ===== V3.2 询盘中心最终版 ===== */


#leads .panel{
    overflow-x:auto;
}


#leads table{
    width:100%;
    table-layout:auto;
}


/* 所有标题不竖排 */

#leadRows th{
    white-space:nowrap;
}


/* 客户 */

#leadRows th:nth-child(1),
#leadRows td:nth-child(1){
    min-width:180px;
}


/* 联系人 */

#leadRows th:nth-child(2),
#leadRows td:nth-child(2){
    min-width:90px;
}


/* 来源 */

#leadRows th:nth-child(3),
#leadRows td:nth-child(3){
    min-width:110px;
}


/* 国家 */

#leadRows th:nth-child(4),
#leadRows td:nth-child(4){
    min-width:70px;
}


/* 联系方式 */

#leadRows th:nth-child(5),
#leadRows td:nth-child(5){
    min-width:180px;
    white-space:normal;
}


/* 询盘内容 */

#leadRows th:nth-child(6),
#leadRows td:nth-child(6){
    min-width:150px;
}


/* 状态 */

#leadRows th:nth-child(7),
#leadRows td:nth-child(7){
    min-width:100px;
    white-space:nowrap;
}


/* 负责人 */

#leadRows th:nth-child(8),
#leadRows td:nth-child(8){
    min-width:100px;
    white-space:nowrap;
}


/* 操作 */

#leadRows th:nth-child(9),
#leadRows td:nth-child(9){
    min-width:260px;
    white-space:nowrap;
}


#leadRows button{
    padding:6px 10px;
    margin-right:5px;
}




/* V3.2 Lead Detail Modal UI */

.detail-row{
    padding:10px 0;
    font-size:15px;
    color:#334155;
    border-bottom:1px solid #eef2f7;
}


.detail-row b{
    display:inline-block;
    width:80px;
    color:#64748b;
}


.follow-item{

    background:#f8fafc;

    border-radius:12px;

    padding:16px;

    margin:14px 0;

    border-left:4px solid #2563eb;

    line-height:1.8;

    color:#334155;

}


.follow-item b{

    color:#0f172a;

}


#modalBody h4{

    margin-top:22px;

    margin-bottom:12px;

    font-size:18px;

    color:#1e293b;

}


#modalBody hr{

    border:none;

    border-top:1px solid #e2e8f0;

    margin:18px 0;

}


.modal-box{

    max-height:80vh;

    overflow-y:auto;

}



.modal-drag{
    cursor:move;
    user-select:none;
}


.modal-header{
    cursor:move;
    user-select:none;
    padding-bottom:15px;
}

.modal-header h3{
    margin:0;
}

