.lead-card {
    display: flex;
    justify-content: space-between;
    align-items: center;

    background: #fff;
    border: 1px solid #dcdfe4;
    border-radius: 10px;

    padding: 16px;
    margin-bottom: 12px;

    cursor: pointer;
    transition: all 0.2s ease;
}

.lead-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0,0,0,.08);
}

.lead-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.lead-actions {
    display: flex;
    align-items: center;
}

.deleteLead {
    background: #dc2626;
}

.deleteLead:hover {
    background: #b91c1c;
}

.lead-header{
    display:flex;
    align-items:center;
    gap:20px;
    margin-bottom:24px;
}

.lead-avatar{

    width:90px;
    height:90px;

    border-radius:50%;

    background:#ececec;

    overflow:hidden;

    flex-shrink:0;

}

.lead-avatar img{

    width:100%;
    height:100%;

    object-fit:cover;

}

.lead-header-info{

    flex:1;

}

.lead-name{

    font-size:26px;

    font-weight:700;

}

.lead-subtitle{

    color:#777;

    margin-top:6px;

}

.leads-filter-bar {
    display: flex;
    flex-direction: column;
    gap: 8px;

    margin-bottom: 12px;
}

.leads-filter-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.leads-filter-bar select,
.leads-filter-bar input[type="text"],
.leads-filter-bar input[type="date"] {
    padding: 8px 10px;
    border: 1px solid #dcdfe4;
    border-radius: 6px;
    font-size: 14px;
}

.leads-filter-value {
    display: flex;
    align-items: center;
    gap: 8px;
}

.leads-filter-value span {
    color: #6b7280;
    font-size: 13px;
}

.leads-filter-remove-btn {
    background: none;
    border: none;
    padding: 4px 6px;
    color: #9ca3af;
    font-size: 14px;
    cursor: pointer;
    border-radius: 4px;
}

.leads-filter-remove-btn:hover {
    background: #fee2e2;
    color: #b42318;
}

.leads-filter-bar-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.leads-filter-multiselect {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;

    max-width: 480px;
    max-height: 76px;
    overflow-y: auto;

    background: white;
    border: 1px solid #dcdfe4;
    border-radius: 6px;
    padding: 4px;
}

.leads-filter-multiselect-option {
    display: flex;
    align-items: center;
    gap: 6px;

    padding: 5px 8px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    white-space: nowrap;
}

.leads-filter-multiselect-option:hover {
    background: #f3f4f6;
}

.leads-filter-multiselect-empty {
    padding: 5px 8px;
    color: #6b7280;
    font-size: 13px;
}

.leads-table-wrap {
    overflow-x: auto;
    background: white;
    border-radius: 10px;
}

.leads-table {
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0;
}

.leads-table th,
.leads-table td {
    width: 110px;
    max-width: 110px;
    box-sizing: border-box;
    padding: 8px 10px;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Essential columns and 操作 are kept in view during horizontal scroll via
   JS (enableColumnPinning in components/lead/leadsTable.js), not CSS position:sticky —
   sticky on table cells doesn't work in this browser (verified: it just
   scrolls with the content). position:relative is what the JS-applied
   transform needs to move the cell relative to its normal position; the
   opaque background keeps scrolled-past custom columns from showing
   through underneath. */
.leads-table-pin-left,
.leads-table-pin-right {
    position: relative;
    z-index: 2;
    background: white;
}

.leads-table thead .leads-table-pin-left,
.leads-table thead .leads-table-pin-right {
    background: #f5f5f5;
    z-index: 3;
}

.leads-table tbody tr.lead-row:hover .leads-table-pin-left,
.leads-table tbody tr.lead-row:hover .leads-table-pin-right {
    background: #f5f7fb;
}

/* Marks the boundary between essential and custom columns — the last
   pinned-left cell in each row, right where the scrollable custom fields
   begin. */
.leads-table-divider {
    border-right: 1px solid #ddd;
}

/* Email is cut off cleanly at the column edge at rest — hard clip, no "..."
   marker (the base cell rule's text-overflow:ellipsis is overridden back to
   clip here) — but the cell is a genuine scroll container, not just
   overflow:hidden, so dragging (enableDragAutoScroll) can reveal the rest.
   Scrollbar is hidden so it still looks like a plain clipped cell at rest. */
.leads-table td.leads-table-scrollable-cell {
    overflow-x: auto;
    overflow-y: hidden;
    text-overflow: clip;
    scrollbar-width: none;
}

.leads-table td.leads-table-scrollable-cell::-webkit-scrollbar {
    display: none;
}

.leads-table th.leads-table-actions,
.leads-table td.leads-table-actions {
    width: 60px;
    max-width: 60px;
}

.leads-table tbody tr.lead-row {
    cursor: pointer;
}

.leads-table tbody tr.lead-row:hover {
    background: #f5f7fb;
}

/* Blank filler column, same width as 操作, right before it in the scrollable
   part of the table — gives the pinned 操作 column some breathing room
   instead of butting straight up against the last custom field column when
   scrolled all the way right. */
.leads-table-spacer {
    width: 60px;
    max-width: 60px;
}

.leads-table-trash {
    background: transparent;
    border: none;
    font-size: 14px;
    line-height: 1;
    padding: 2px 4px;
    cursor: pointer;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.leads-table-trash + .leads-table-trash {
    margin-left: 2px;
}

.leads-table-stage {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.leads-table-stage-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.leads-table-trash:hover {
    background: #fee2e2;
}