/*======================================================
    GridLabs CRM Pro
    Leads Page
    Light Theme
======================================================*/

.lead-page {
    width: 100%;
}


/*======================================================
    Page Header
======================================================*/

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

    gap: 20px;

    margin-bottom: 24px;
}

.lead-page-title h1 {
    margin: 0;

    color: #1f2937;

    font-size: 24px;
    font-weight: 600;
}

.lead-page-title p {
    margin: 6px 0 0;

    color: #64748b;

    font-size: 13px;
}

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

.lead-page-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 8px;

    min-height: 42px;

    padding: 0 18px;

    border: 0;
    border-radius: 9px;

    background: var(--primary);
    color: #fff;

    font-family: inherit;
    font-size: 13px;
    font-weight: 500;

    cursor: pointer;

    transition: var(--transition);
}

.lead-page-actions .btn:hover {
    transform: translateY(-1px);
}


/*======================================================
    Statistics
======================================================*/

.lead-stats {
    display: grid;

    grid-template-columns: repeat(5, minmax(0, 1fr));

    gap: 16px;

    margin-bottom: 22px;
}

.lead-stat-card {
    display: flex;
    align-items: center;

    gap: 12px;

    min-width: 0;

    padding: 17px;

    background: #fff;

    border: 1px solid #e5e7eb;

    border-radius: 13px;

    box-shadow: 0 4px 18px rgba(15, 23, 42, .05);

    transition: var(--transition);
}

.lead-stat-card:hover {
    transform: translateY(-2px);

    box-shadow: 0 7px 22px rgba(15, 23, 42, .08);
}

.lead-stat-icon {
    width: 42px;
    height: 42px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    border-radius: 10px;

    background: #fff1f1;

    color: var(--primary);

    font-size: 16px;
}

.lead-stat-card span {
    display: block;

    margin-bottom: 4px;

    color: #64748b;

    font-size: 11px;
}

.lead-stat-card strong {
    display: block;

    color: #1f2937;

    font-size: 20px;
    font-weight: 600;
}


/*======================================================
    Lead Panel
======================================================*/

.lead-panel {
    overflow: hidden;

    background: #fff;

    border: 1px solid #e5e7eb;

    border-radius: 14px;

    box-shadow: 0 4px 20px rgba(15, 23, 42, .05);
}


/*======================================================
    Toolbar
======================================================*/

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

    gap: 15px;

    padding: 16px 18px;

    border-bottom: 1px solid #edf2f7;
}

.lead-search {
    position: relative;

    width: 320px;
}

.lead-search i {
    position: absolute;

    top: 50%;
    left: 13px;

    transform: translateY(-50%);

    color: #94a3b8;

    font-size: 12px;

    pointer-events: none;
}

.lead-search input {
    width: 100%;

    height: 40px;

    padding: 0 13px 0 36px;

    border: 1px solid #e2e8f0;

    border-radius: 8px;

    outline: none;

    background: #fff;

    color: #1f2937;

    font-family: inherit;

    font-size: 12px;
}

.lead-search input:focus {
    border-color: var(--primary);

    box-shadow: 0 0 0 3px rgba(196, 0, 0, .08);
}

.lead-search input::placeholder {
    color: #94a3b8;
}

.lead-filters {
    display: flex;

    align-items: center;

    gap: 10px;
}

.lead-filters select {
    height: 40px;

    min-width: 135px;

    padding: 0 30px 0 12px;

    border: 1px solid #e2e8f0;

    border-radius: 8px;

    outline: none;

    background: #fff;

    color: #475569;

    font-family: inherit;

    font-size: 12px;

    cursor: pointer;
}

.lead-filters select:focus {
    border-color: var(--primary);
}


/*======================================================
    Table Wrapper
======================================================*/

.lead-table-wrapper {
    width: 100%;

    overflow-x: auto;

    -webkit-overflow-scrolling: touch;
}


/*======================================================
    Table
======================================================*/

.lead-table {
    width: 100%;

    min-width: 950px;

    border-collapse: collapse;
}

.lead-table th {
    padding: 13px 16px;

    background: #f8fafc;

    border-bottom: 1px solid #e5e7eb;

    color: #64748b;

    font-size: 10px;

    font-weight: 600;

    text-align: left;

    white-space: nowrap;
}

.lead-table td {
    padding: 14px 16px;

    border-bottom: 1px solid #f1f5f9;

    color: #475569;

    font-size: 11px;

    vertical-align: middle;
}

.lead-table tbody tr:hover {
    background: #fafafa;
}

.lead-table tbody tr:last-child td {
    border-bottom: 0;
}


/*======================================================
    Lead User
======================================================*/

.lead-user-cell {
    display: flex;
    align-items: center;

    gap: 10px;

    min-width: 180px;
}

.lead-avatar {
    width: 34px;
    height: 34px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    border-radius: 50%;

    background: #fff1f1;

    color: var(--primary);

    font-size: 12px;
}

.lead-user-cell > div:last-child {
    min-width: 0;
}

.lead-user-cell strong {
    display: block;

    max-width: 150px;

    overflow: hidden;

    color: #1f2937;

    font-size: 11px;

    font-weight: 600;

    white-space: nowrap;

    text-overflow: ellipsis;
}

.lead-user-cell span {
    display: block;

    max-width: 150px;

    margin-top: 3px;

    overflow: hidden;

    color: #94a3b8;

    font-size: 9px;

    white-space: nowrap;

    text-overflow: ellipsis;
}


/*======================================================
    Contact
======================================================*/

.lead-contact-cell span {
    display: inline-flex;

    align-items: center;

    gap: 6px;

    white-space: nowrap;
}

.lead-contact-cell i {
    color: #94a3b8;

    font-size: 10px;
}


/*======================================================
    Status
======================================================*/

.lead-status {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    padding: 4px 9px;

    border-radius: 20px;

    font-size: 9px;

    font-weight: 600;

    white-space: nowrap;
}

.lead-status-new {
    background: #eff6ff;
    color: #2563eb;
}

.lead-status-contacted {
    background: #fff7ed;
    color: #ea580c;
}

.lead-status-converted {
    background: #f0fdf4;
    color: #16a34a;
}

.lead-status-closed {
    background: #f1f5f9;
    color: #475569;
}


/*======================================================
    Actions
======================================================*/

.lead-actions-column {
    text-align: right !important;
}

.lead-row-actions {
    display: flex;

    align-items: center;
    justify-content: flex-end;

    gap: 5px;
}

.lead-action-btn {
    width: 30px;
    height: 30px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid #e5e7eb;

    border-radius: 7px;

    background: #fff;

    color: #64748b;

    cursor: pointer;

    transition: var(--transition);
}

.lead-action-btn:hover {
    color: var(--primary);

    border-color: #fecaca;

    background: #fff7f7;
}


/*======================================================
    Empty State
======================================================*/

.lead-table-empty {
    height: 250px;

    text-align: center !important;
}

.lead-table-empty > div {
    display: flex;

    flex-direction: column;

    align-items: center;
    justify-content: center;
}

.lead-table-empty i {
    margin-bottom: 12px;

    color: #cbd5e1;

    font-size: 32px;
}

.lead-table-empty h3 {
    margin: 0;

    color: #475569;

    font-size: 14px;
}

.lead-table-empty p {
    margin: 5px 0 0;

    color: #94a3b8;

    font-size: 11px;
}


/*======================================================
    Pagination
======================================================*/

.lead-pagination {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 15px;

    padding: 14px 18px;

    border-top: 1px solid #edf2f7;
}

.lead-pagination-info {
    color: #94a3b8;

    font-size: 10px;
}

.lead-pagination-info strong {
    color: #475569;
}

.lead-pagination-buttons {
    display: flex;

    align-items: center;

    gap: 5px;
}


/*======================================================
    Tablet
======================================================*/

@media (max-width: 1199px) {

    .lead-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

}


/*======================================================
    Tablet
======================================================*/

@media (max-width: 991px) {

    .lead-page-header {
        margin-bottom: 20px;
    }

    .lead-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .lead-toolbar {
        flex-wrap: wrap;
    }

    .lead-search {
        flex: 1;

        min-width: 220px;
    }

}


/*======================================================
    Mobile
======================================================*/

@media (max-width: 767px) {

    .lead-page-header {
        flex-direction: column;

        align-items: flex-start;
    }

    .lead-page-actions {
        width: 100%;
    }

    .lead-page-actions .btn {
        width: 100%;
    }

    .lead-stats {
        grid-template-columns: 1fr;

        gap: 12px;
    }

    .lead-toolbar {
        align-items: stretch;

        flex-direction: column;
    }

    .lead-search {
        width: 100%;
    }

    .lead-filters {
        width: 100%;
    }

    .lead-filters select {
        flex: 1;

        min-width: 0;
    }

}


/*======================================================
    Small Mobile
======================================================*/

@media (max-width: 575px) {

    .lead-page-title h1 {
        font-size: 21px;
    }

    .lead-page-title p {
        font-size: 12px;
    }

    .lead-stat-card {
        padding: 15px;
    }

    .lead-pagination {
        align-items: flex-start;

        flex-direction: column;
    }

}