.leads-container{

    padding:40px;

    width:100%;

    overflow-x:auto;

    box-sizing:border-box;

    position: relative; /* هذا السطر يمنع تداخل العناصر ويحمي الأزرار */

}

.leads-header{

    display:flex;

    justify-content:space-between;

    align-items:center;

    margin-bottom:30px;

}

.leads-title{

    font-size:42px;

    font-weight:700;

    color:#1e40af;

}

.leads-actions{

    display:flex;

    gap:15px;

    align-items:center;

    flex-wrap:wrap;

}

.import-btn,
.add-leads-btn{

    background:#1d4ed8;

    color:white;

    padding:14px 22px;

    border:none;

    border-radius:14px;

    font-size:15px;

    font-weight:600;

    cursor:pointer;

    min-width:180px;

}

.import-btn{

    background:#e5e7eb;

    color:#111827;

}

.import-btn:hover{

    background:#d1d5db;

}

.add-leads-btn{

    background:#1d4ed8;

    color:white;

}

.add-leads-btn:hover{

    background:#1e3a8a;

}

.leads-stats{

    display:grid;

    grid-template-columns:repeat(4,1fr);

    gap:20px;

    margin-bottom:30px;

}

.stat-card{

    background:white;

    border-radius:18px;

    padding:25px;

    box-shadow:0 4px 12px rgba(0,0,0,0.06);

}

.stat-card h3{

    font-size:16px;

    color:#6b7280;

    margin-bottom:10px;

}

.stat-card p{

    font-size:32px;

    font-weight:700;

    color:#111827;

}

.search-box{

    margin-bottom:25px;

}

.search-box input{

    width:100%;

    padding:16px;

    border-radius:14px;

    border:1px solid #d1d5db;

    font-size:15px;

    outline:none;

}

.search-box input:focus{

    border-color:#2563eb;

}

.leads-card{

    background:white;

    border-radius:22px;

    padding:25px;

    box-shadow:0 4px 20px rgba(0,0,0,0.05);

}

.leads-table{

    width:100%;

    border-collapse:collapse;

}

.leads-table thead{

    border-bottom:1px solid #e5e7eb;

}

.leads-table th{

    text-align:left;

    padding:18px;

    font-size:15px;

    color:#6b7280;

}

.leads-table td{

    padding:20px 18px;

    font-size:15px;

    color:#111827;

}

.leads-table tbody tr{

    border-bottom:1px solid #f3f4f6;

    transition:0.2s;

}

.leads-table tbody tr:hover{

    background:#f9fafb;

}

.status{

    padding:8px 14px;

    border-radius:30px;

    font-size:13px;

    font-weight:600;

}

.status.active{

    background:#dcfce7;

    color:#166534;

}

.table-btn{

    border:none;

    padding:10px 14px;

    border-radius:10px;

    cursor:pointer;

    font-size:13px;

    font-weight:600;

    margin-right:8px;

    transition:0.2s;

}

.view-btn{

    background:#dbeafe;

    color:#1d4ed8;

}

.view-btn:hover{

    background:#bfdbfe;

}

.delete-btn{

    background:#fee2e2;

    color:#dc2626;

}

.delete-btn:hover{

    background:#fecaca;

}

@media(max-width:1200px){

    .leads-stats{

        grid-template-columns:repeat(2,1fr);

    }

}

@media(max-width:768px){

    .leads-header{

        flex-direction:column;

        align-items:flex-start;

        gap:20px;

    }

    .leads-stats{

        grid-template-columns:1fr;

    }

}

.view-leads-modal{

    width:900px;

    max-height:80vh;

    overflow:hidden;

}

.leads-viewer-list{

    margin-top:20px;

    max-height:500px;

    overflow-y:auto;

}

.leads-viewer-table{

    width:100%;

    border-collapse:collapse;

}

.leads-viewer-table th,
.leads-viewer-table td{

    padding:14px;

    border-bottom:1px solid #eee;

    text-align:left;

}

.leads-viewer-table th{

    background:#f9fafb;

    position:sticky;

    top:0;

}

#importListSelect,
#newImportListName{

    width:100%;

    padding:14px;

    border:1px solid #ddd;

    border-radius:12px;

    margin-bottom:15px;

    font-size:14px;

}

.viewer-actions{

    display:flex;

    gap:10px;

    margin:15px 0;

}

.lead-checkbox{

width:18px;

height:18px;

cursor:pointer;

flex-shrink:0;

}

.lead-checkbox{

width:18px !important;

height:18px !important;

min-width:18px;

min-height:18px;

cursor:pointer;

accent-color:#2f5fe3;

transform:scale(1);

margin:0;

padding:0;

box-sizing:border-box;

}

/* HEADER CHECKBOX */

#selectAllCheckbox{

width:18px !important;

height:18px !important;

cursor:pointer;

accent-color:#2f5fe3;

}

#leadsViewerTable th:first-child,
#leadsViewerTable td:first-child{

width:50px;
text-align:center;

}

.lead-checkbox{

width:18px;
height:18px;
cursor:pointer;

}

.leads-viewer-page{

display:none;

position:absolute;

top:0;

left:0;

width:100%;

height:100%;

background:#f4f7fb;

padding:40px;

box-sizing:border-box;

overflow:auto;

z-index:999;

}

.viewer-header{

display:flex;

justify-content:space-between;

align-items:center;

margin-bottom:20px;

}

.close-viewer-btn{

width:45px;

height:45px;

border:none;

border-radius:12px;

background:#ff4d4f;

color:white;

font-size:22px;

cursor:pointer;

}

.viewer-actions{

display:flex;

gap:12px;

margin-bottom:20px;

}

.viewer-table{

width:100%;

border-collapse:collapse;

background:white;

border-radius:20px;

overflow:hidden;

}

.viewer-table th,
.viewer-table td{

padding:16px;

border-bottom:1px solid #eee;

text-align:left;

}

.modal-actions{
    display:flex;
    justify-content:flex-end;
    gap:12px;
    margin-top:22px;
}

.modal-primary-btn{
    background:#2f5fe3;
    color:#fff;
    border:none;
    padding:13px 24px;
    border-radius:12px;
    font-size:15px;
    font-weight:700;
    cursor:pointer;
}

.modal-secondary-btn{
    background:#e8eef7;
    color:#102033;
    border:none;
    padding:13px 24px;
    border-radius:12px;
    font-size:15px;
    font-weight:700;
    cursor:pointer;
}