:root {
    --lead-primary: #3b82f6;
    --lead-bg: #f1f5f9;
    --lead-card-bg: #ffffff;
    --lead-text-main: #111827;
    --lead-text-sub: #6b7280;
    --lead-border: #e2e8f0;
    --lead-selected-border: #3b82f6;
    --lead-selected-bg: #eff6ff;
    --lead-claimed-bg: #facc15;
    --lead-claimed-text: #854d0e;

    /* Table View Variables */
    --lead-row-height: 60px;
    --lead-header-bg: #f8fafc;
}

.leads-wrapper {
    margin: 40px auto;
    max-width: 1400px;
    /* Increased max-width for 4 columns */
    font-family: 'Inter', sans-serif;
}

/* =========================================
   CONTROLS BAR
   ========================================= */
.leads-controls-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    gap: 16px;
    flex-wrap: wrap;
}

.view-toggle {
    display: flex;
    background: #e2e8f0;
    border-radius: 8px;
    padding: 4px;
    gap: 4px;
}

.view-btn {
    border: none;
    background: transparent;
    padding: 8px;
    border-radius: 6px;
    color: #64748b;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.view-btn:hover {
    color: var(--lead-text-main);
    background: rgba(255, 255, 255, 0.4);
}

.view-btn.active {
    background: white;
    color: var(--lead-primary);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* =========================================
   GRID / CARDS LAYOUT
   ========================================= */
.lead-grid {
    display: grid;
    /* Cards View: Responsive Grid */
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    /* Removed transition: all from grid container to avoid layout recalculations */
}

/* @media (min-width: 1280px) {
    .lead-grid.view-mode-cards {
        grid-template-columns: repeat(4, 1fr);
    }
} */

.lead-card {
    background: var(--lead-card-bg);
    border: 1px solid var(--lead-border);
    border-radius: 12px;
    position: relative;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    will-change: transform, box-shadow;
}

.lead-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border-color: #cbd5e1;
    z-index: 2;
}

.lead-card.is-selected {
    border-color: var(--lead-selected-border);
    background-color: #f8fafc;
    /* Use outline for selection to avoid triggering layout reflow */
    outline: 1px solid var(--lead-selected-border);
    outline-offset: -1px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
}

/* Claimed Logic */
.lead-card.is-claimed-card {
    pointer-events: none;
}

.lead-card.is-claimed-card .lead-card-content,
.lead-card.is-claimed-card .lead-type-header {
    opacity: 0.5;
    filter: grayscale(1);
}

.claimed-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-10deg);
    background: var(--lead-claimed-bg);
    color: var(--lead-claimed-text);
    padding: 8px 24px;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 1.2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    z-index: 10;
    border: 2px solid #fff;
    letter-spacing: 0.1em;
}

/* =========================================
   TABLE HEADER (Hidden by default)
   ========================================= */
.leads-table-header {
    display: none;
    /* Hidden in Card View */
}

/* We are choosing NOT to show the header in Table View for now, 
   as we are using a "Horizontal Card" layout where labels are inside. 
   If strictly requested, uncomment below. */
/* 
.leads-table-header.is-visible {
    display: grid;
} 
*/

/* =========================================
   TABLE VIEW TRANSFORMATION
   ========================================= */
/* =========================================
   TABLE VIEW TRANSFORMATION (Horizontal Card)
   ========================================= */
.lead-grid.view-mode-table {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.lead-grid.view-mode-table .lead-card {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    /* Match height of children */
    min-height: 80px;
    background: white;
    border-radius: 8px;
    /* Slightly smaller radius for list look */
}

/* 1. Checkbox Column */
.lead-grid.view-mode-table .lead-checkbox {
    display: block;
    margin: 0 0 0 16px;
    align-self: center;
    /* Custom styling */
    width: 18px;
    height: 18px;
    accent-color: var(--lead-primary);
    flex-shrink: 0;
}

/* 2. Header Section (Left Side: Price, Date, Loc, Type) */
/* In card view this is top. In table, we make it the left pillar or first section. */
.lead-grid.view-mode-table .lead-type-header {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 220px;
    flex-shrink: 0;
    padding: 12px 16px;
    background: #f8fafc;
    border-radius: 8px 0 0 8px;
    border-bottom: none;
    border-right: 1px solid var(--lead-border);
    gap: 4px;
    text-align: center;
}

/* Adjustments inside Header for Table View */
.lead-grid.view-mode-table .lead-type-header .lead-header-price {
    order: -1;
    justify-content: center;
    align-items: center;
    width: auto;
    align-self: center;
    min-width: auto;
}

.lead-grid.view-mode-table .lead-type-header .lead-sub-meta {
    flex-wrap: wrap;
    gap: 4px;
    justify-content: center;
    width: auto;
    align-self: center;
}

.lead-grid.view-mode-table .lead-type-header .lead-header-meta {
    flex: 0 0 auto;
    align-items: center;
    gap: 4px;
    justify-content: center;
    width: auto;
    align-self: center;
    min-width: auto;
    text-align: center;
}

.lead-grid.view-mode-table .lead-type-header .lead-location-text {
    justify-content: center;
    width: auto;
    align-self: center;
}

.lead-grid.view-mode-table .lead-type-header .lead-price-stack {
    align-items: center;
}

/* 3. Content Section (Right Side: Details, Badges, Summary) */
.lead-grid.view-mode-table .lead-card-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 12px 20px;
    flex-grow: 1;
    gap: 24px;
}

/* Layout content items horizontally */

/* Wrapper for center column (Type + Details) */
.lead-grid.view-mode-table .lead-details-wrapper {
    display: flex;
    flex-direction: column;
    width: 440px;
    /* Width for the whole column */
    flex-shrink: 0;
    gap: 8px;
    justify-content: center;
}

/* A. Main Info (Badges - Now stacked on top of grid) */
.lead-grid.view-mode-table .lead-main-info {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
    width: 100%;
    display: flex;
    flex-direction: row;
    /* Allow badges to flow if multiple? */
    flex-wrap: wrap;
    gap: 4px;
}

/* B. Details Grid - 3 Column Grid (Compact) */
.lead-grid.view-mode-table .lead-details-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px 16px;
    width: 100%;
    /* Fill wrapper */
}

/* Hide labels to save space? Or keep them? User said "more of a card" so keep labels but compact. */
.lead-grid.view-mode-table .detail-item {
    min-width: 0;
    /* Allow shrinking in grid */
}

/* C. Summary */
.lead-grid.view-mode-table .lead-summary-compact {
    border-top: none;
    margin-top: 0;
    padding-top: 0;
    border-left: 1px dashed #e2e8f0;
    padding-left: 24px;
    flex-grow: 1;
    /* Take remaining space */
    font-size: 0.85rem;
    align-self: stretch;
    display: flex;
    align-items: center;
    /* Center vertically? Or top? */
}

.lead-grid.view-mode-table .summary-text {
    display: block;
    overflow: visible;
    white-space: normal;
    /* Show full text */
}

.summary-text ul {
    padding-inline-start: 10px !important;
}

/* Hide specific elements if needed */
.lead-grid.view-mode-table .selection-overlay {
    display: none;
    /* Use checkbox instead */
}

/* Hover effect for Table Row */
.lead-grid.view-mode-table .lead-card:hover {
    border-color: var(--lead-primary);
    transform: translateX(4px);
    /* Subtle shift right */
}

/* Responsive: Collapse on mobile? */
@media (max-width: 1024px) {
    .lead-grid.view-mode-table .lead-card {
        flex-wrap: wrap;
        overflow: visible;
        /* Ensure mobile doesn't clip if wrapped, though usually mobile columns are simpler */
    }

    .lead-grid.view-mode-table .lead-type-header {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--lead-border);
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        border-radius: 8px 8px 0 0;
    }

    .lead-grid.view-mode-table .lead-card-content {
        flex-wrap: wrap;
    }

    .lead-grid.view-mode-table .lead-summary-compact {
        width: 100%;
        border-left: none;
        border-top: 1px dashed #e2e8f0;
        padding-left: 0;
        padding-top: 12px;
    }
}


/* =========================================
   CARD VIEW STYLING (Default)
   ========================================= */

/* Type Header */
.lead-type-header {
    border-radius: 12px 12px 0 0;
    background: #f8fafc;
    padding: 12px 16px;
    border-bottom: 1px solid var(--lead-border);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
}

.lead-type-badge {
    background: #dbeafe;
    color: #1e40af;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 6px;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.lead-header-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    flex: 1;
}

.lead-header-price {
    display: flex;
    justify-content: flex-end;
    min-width: 170px;
}

.lead-price-stack {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-end;
    padding: 8px 12px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(14, 165, 233, 0.14));
    border-radius: 12px;
    border: 1px solid rgba(59, 130, 246, 0.15);
    box-shadow: 0 6px 16px -12px rgba(14, 165, 233, 0.35);
}

.lead-price-stack.is-on-sale {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.14), rgba(59, 130, 246, 0.18));
    border-color: rgba(37, 99, 235, 0.35);
    box-shadow: 0 8px 18px -12px rgba(37, 99, 235, 0.45);
}

.price-topline {
    display: flex;
    align-items: center;
    gap: 10px;
}

.price-current {
    font-weight: 800;
    font-size: 1.35rem;
    color: #0f172a;
    letter-spacing: -0.01em;
}

.price-chip {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    padding: 3px 10px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.78rem;
    box-shadow: 0 6px 14px -8px rgba(37, 99, 235, 0.6);
}

.price-baseline {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #475569;
    font-size: 0.82rem;
}

.price-label {
    text-transform: uppercase;
    font-size: 0.65rem;
    letter-spacing: 0.08em;
    color: #94a3b8;
    font-weight: 700;
}

.price-was {
    text-decoration: line-through;
    color: #94a3b8;
    font-weight: 700;
}

.price-note {
    font-size: 0.78rem;
    color: var(--lead-primary);
    font-weight: 700;
    line-height: 1.2;
}

.lead-price-stack.is-standard .price-note {
    color: #475569;
    font-weight: 600;
}

/* Content */
.lead-card-content {
    padding: 16px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    flex-direction: column;
    gap: 12px;
}

.lead-details-wrapper {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.lead-main-info {
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 12px;
    margin-bottom: 4px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.lead-sub-meta {
    display: flex;
    gap: 12px;
    font-size: 0.85rem;
    color: var(--lead-text-sub);
    align-items: center;
}

.lead-location-text,
.lead-date-text {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* SVG Helpers */
.w-4 {
    width: 16px;
    height: 16px;
}

.w-5 {
    width: 20px;
    height: 20px;
}

/* 2-Column Details Grid */
.lead-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px 16px;
}

.detail-item {
    display: flex;
    flex-direction: column;
}

.detail-label {
    font-size: 0.77rem;
    text-transform: uppercase;
    color: #94a3b8;
    font-weight: 600;
    letter-spacing: 0.05em;
    line-height: 1.2;
}

.detail-value {
    font-size: 0.85rem;
    font-weight: 600;
    color: #334155;
    display: flex;
    align-items: center;
    min-height: 20px;
    line-height: 1.3;
    padding: 6px 0;
}

.text-green {
    color: #16a34a;
}

.text-red {
    color: #dc2626;
}

/* Summary */
.lead-summary-compact {
    font-size: 0.85rem;
    color: #64748b;
    line-height: 1.5;
    padding-top: 12px;
    border-top: 1px dashed #e2e8f0;
    margin-top: auto;
}

/* Selection Overlay (Card Only) */
.selection-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    border: 1px solid transparent;
    border-radius: 12px;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.check-circle {
    width: 40px;
    height: 40px;
    background: var(--lead-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.check-circle svg {
    width: 24px;
    height: 24px;
}

.lead-card.is-selected .selection-overlay {
    background: rgba(59, 130, 246, 0.05);
}

.lead-card.is-selected .check-circle {
    opacity: 1;
    transform: scale(1);
}

.hidden-checkbox {
    display: none;
}


/* Table View Refinements - Removed (Handled in main block above) */


/* =========================================
   PAGINATION
   ========================================= */
.ul-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
}

.ul-pagination ul {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 8px;
}

.ul-pagination li {
    display: inline-flex;
    margin: 0;
}

.ul-pagination a,
.ul-pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #e2e8f0;
    color: var(--lead-text-main);
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.2s, transform 0.2s;
}

.ul-pagination a:hover {
    border-color: var(--lead-primary);
    color: var(--lead-primary);
}

.ul-pagination .current {
    background: var(--lead-primary);
    color: white;
    border-color: var(--lead-primary);
}


/* =========================================
   FLOATING CART BAR
   ========================================= */
.ul-floating-bar {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(150%);
    background: #1e293b;
    color: white;
    padding: 12px 24px;
    border-radius: 99px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    will-change: transform;
    backface-visibility: hidden;
    -webkit-font-smoothing: subpixel-antialiased;
}

.ul-floating-bar.is-visible {
    transform: translateX(-50%) translateY(0);
}

.bar-info {
    font-weight: 500;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.bar-count-badge {
    background: var(--lead-primary);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.85rem;
}

.btn-bulk-add {
    background: white;
    color: #0f172a;
    padding: 10px 24px;
    border-radius: 99px;
    font-weight: 700;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.2s;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
}

.btn-bulk-add:hover {
    background: #f1f5f9;
    color: #0f172a;
    transform: scale(1.05);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
}

.btn-bulk-add:active {
    transform: scale(0.95);
}

/* Warnings/States */
.btn-bulk-add.is-warning {
    background-color: #ef4444;
    color: white;
}



/* =========================================
   FILTER BAR
   ========================================= */
/* =========================================
   FILTER BAR ANIMATION
   ========================================= */

/* Wrapper to hold button and form */
.filter-wrapper {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    /* Optional: set min-height to avoid vertical layout shifts */
    min-height: 48px;
    gap: 10px;
}

/* Filter Controls Group (Toggle + Button) */
.ul-filter-controls-group {
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.ul-filter-controls-group:hover {
    box-shadow: 0 4px 10px -6px rgba(15, 23, 42, 0.12);
    border-color: #cbd5e1;
}

.ul-filter-controls-group .ul-standalone-toggle {
    padding: 0 12px;
    border-right: 1px solid #e2e8f0;
    margin: 0;
    height: 100%;
    display: flex;
    align-items: center;
}

.ul-filter-controls-group .ul-standalone-toggle .ul-toggle-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
}

.ul-filter-controls-group .ul-filter-btn {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 10px 14px !important;
    border-radius: 0 8px 8px 0 !important;
    font-weight: 700 !important;
    letter-spacing: 0.01em !important;
    color: #475569 !important;
}

/* Hidden State for Button inside Group */
.ul-filter-controls-group .ul-filter-btn.is-hidden {
    max-width: 0;
    padding-left: 0 !important;
    padding-right: 0 !important;
    border-width: 0;
    overflow: hidden !important;
    opacity: 0 !important;
    transform: scale(0.9) !important;
    pointer-events: none;
    margin: 0;
}

.ul-filter-btn {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 10px 14px !important;
    font-weight: 700 !important;
    letter-spacing: 0.01em !important;
    color: #475569 !important;
    cursor: pointer !important;
    position: relative !important;
    overflow: hidden !important;
    text-transform: none !important;
    transition: transform 0.18s ease,
        box-shadow 0.2s ease,
        background 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease,
        opacity 0.4s ease,
        max-width 0.4s cubic-bezier(0.16, 1, 0.3, 1),
        padding 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
    max-width: 200px !important;
    opacity: 1 !important;
    transform: scale(1) !important;
    margin-right: 0 !important;
}

.ul-filter-btn:hover {
    color: #1f2937 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 10px -6px rgba(15, 23, 42, 0.12) !important;
    background: #f8fafc !important;
    border-color: #cbd5e1 !important;
}

/* Hidden State for Button: Shrink to 0 width */
.ul-filter-btn.is-hidden {
    max-width: 0;
    padding-left: 0;
    padding-right: 0;
    border-width: 0;
    overflow: hidden;
    opacity: 0;
    transform: scale(0.9);
    pointer-events: none;
    margin: 0;
}

.filter-icon {
    display: inline-flex;
    width: 16px;
    height: 16px;
}

.filter-icon svg {
    width: 100%;
    height: 100%;
}

.filter-label {
    font-size: 0.92rem;
}

/* Filter Form - Animates In */
.leads-filter-bar {
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    display: flex;
    gap: 12px;
    align-items: center;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
    transition: opacity 0.3s ease, transform 0.3s ease, padding 0.3s ease;
    max-width: 1200px;
    opacity: 1;
    padding: 12px 16px;
    transform: translateX(0);
    overflow: hidden;
}

/* Hidden State for Bar: Shrink to 0 */
.leads-filter-bar.hidden-bar {
    max-width: 0;
    padding-left: 0;
    padding-right: 0;
    border-width: 0;
    opacity: 0;
    transform: translateX(20px);
    pointer-events: none;
    visibility: visible;
    /* Must be visible to animate layout */
    margin: 0;
    position: static;
    /* Ensure in flow */
}

/* Ensure contents don't wrap while shrinking */
.leads-filter-bar .filter-group {
    flex-shrink: 0;
    white-space: nowrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-group label {
    display: none;
    /* Compact mode: hide external labels */
}

.ul-select,
.ul-input {
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.9rem;
    color: var(--lead-text-main);
    min-width: 160px;
    background-color: #fff;
    cursor: pointer;
    height: 40px;
    /* Enforce consistent height */
}

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

.ul-select:focus,
.ul-input:focus {
    outline: none;
    border-color: var(--lead-primary);
    box-shadow: 0 0 0 2px var(--lead-selected-bg);
}

#ul-reset-filters {
    padding: 0 16px;
    height: 40px;
    /* Match input height */
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: #64748b;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
    display: flex;
    align-items: center;
}

#ul-reset-filters:hover {
    background: #e2e8f0;
    color: #475569;
}




/* =========================================
   RESPONSIVENESS
   ========================================= */
@media (max-width: 1024px) {

    /* Force Cards view on mobile? Or scrollable table? */
    /* Table view on mobile is usually terrible. Let's allow horizontal scroll if table. */
    .leads-container.view-mode-table {
        overflow-x: auto;
    }

    .lead-grid.view-mode-table {
        min-width: 900px;
        /* Ensure table keeps structure */
    }

    .leads-table-header.is-visible {
        min-width: 900px;
    }
}

@media (max-width: 640px) {
    .lead-grid {
        grid-template-columns: 1fr;
    }

    .lead-type-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .lead-header-price {
        width: 100%;
        justify-content: flex-start;
    }

    .lead-price-stack {
        align-items: flex-start;
        width: 100%;
    }

    .leads-filter-bar {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }

    .view-toggle {
        display: none;
        /* Hide toggle on mobile, maybe? Or keep it if table scrolls */
    }
}

/* =========================================
   LOADING ANIMATION
   ========================================= */
.leads-container {
    position: relative;
    min-height: 200px;
}

.leads-loading {
    display: none;
    /* JS will toggle flex */
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.85);
    /* Removed backdrop-filter for performance */
    z-index: 50;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(59, 130, 246, 0.1);
    border-radius: 50%;
    border-top-color: var(--lead-primary);
    animation: spin 0.8s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Smooth Fade In for Cards */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.lead-card {
    animation: fadeIn 0.4s ease-out forwards;
}

/* Stagger animation for items (up to 20 items) */
.lead-card:nth-child(1) {
    animation-delay: 0.05s;
}

.lead-card:nth-child(2) {
    animation-delay: 0.1s;
}

.lead-card:nth-child(3) {
    animation-delay: 0.15s;
}

.lead-card:nth-child(4) {
    animation-delay: 0.2s;
}

.lead-card:nth-child(5) {
    animation-delay: 0.25s;
}

.lead-card:nth-child(6) {
    animation-delay: 0.3s;
}

.lead-card:nth-child(7) {
    animation-delay: 0.35s;
}

.lead-card:nth-child(8) {
    animation-delay: 0.4s;
}

.lead-card:nth-child(9) {
    animation-delay: 0.45s;
}

.lead-card:nth-child(10) {
    animation-delay: 0.5s;
}

.lead-card:nth-child(11) {
    animation-delay: 0.55s;
}

.lead-card:nth-child(12) {
    animation-delay: 0.6s;
}

.lead-card:nth-child(13) {
    animation-delay: 0.65s;
}

.lead-card:nth-child(14) {
    animation-delay: 0.7s;
}

.lead-card:nth-child(15) {
    animation-delay: 0.75s;
}

.lead-card:nth-child(16) {
    animation-delay: 0.8s;
}

.lead-card:nth-child(17) {
    animation-delay: 0.85s;
}

.lead-card:nth-child(18) {
    animation-delay: 0.9s;
}

.lead-card:nth-child(19) {
    animation-delay: 0.95s;
}

.lead-card:nth-child(20) {
    animation-delay: 1.0s;
}

/* =========================================
   TOOLTIPS
   ========================================= */
[data-tooltip] {
    position: relative;
    cursor: help;
}

[data-tooltip]:before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    background: #1e293b;
    /* Dark Slate */
    color: #f8fafc;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.4;
    white-space: normal;
    min-width: 200px;
    max-width: 320px;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
    z-index: 100;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-tooltip]:after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(0);
    border: 6px solid transparent;
    border-top-color: #1e293b;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
    z-index: 100;
    margin-bottom: -11px;
    /* Adjust to connect with tooltip, accounting for transform */
}

[data-tooltip]:hover:before,
[data-tooltip]:hover:after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-12px);
}

/* =========================================
   ONE-STEP CHECKOUT PANEL
   ========================================= */
body.ul-lock {
    overflow: hidden;
}

.ul-one-step-shell {
    position: fixed;
    inset: 0;
    z-index: 1400;
    display: none;
    /* Changed from flex to none when closed */
    align-items: flex-end;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.25s ease, visibility 0.25s;
    visibility: hidden;
    font-family: 'Inter', sans-serif;
}

.ul-one-step-shell.is-open {
    display: flex;
    /* Show when open */
    pointer-events: all;
    opacity: 1;
    visibility: visible;
}

.ul-one-step-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.75);
    /* Removed backdrop-filter for performance */
}

.ul-one-step-panel {
    position: relative;
    width: min(1240px, 96vw);
    max-height: 90vh;
    height: auto;
    background: #f8fafc;
    border-radius: 20px 20px 0 0;
    overflow: hidden;
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.35);
    transform: translateY(40px);
    transition: transform 0.25s ease;
}

.ul-one-step-shell.is-open .ul-one-step-panel {
    transform: translateY(0);
}

.ul-one-step-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 22px 18px;
    background: linear-gradient(135deg, #0f172a, #1d4ed8);
    color: #fff;
    transition: background 0.5s ease;
}

.ul-one-step-shell.is-success .ul-one-step-header {
    background: #10b981;
    /* Green */
}

.ul-one-step-header h3 {
    margin: 4px 0;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.ul-kicker {
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 12px;
    /* color: rgba(255, 255, 255, 0.75); */
    font-weight: 700;
}

.ul-subtitle {
    margin: 4px 0 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
}

.ul-close-checkout {
    width: 38px !important;
    height: 38px !important;
    border-radius: 50% !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    background: rgba(255, 255, 255, 0.12) !important;
    color: #fff !important;
    font-size: 20px !important;
    padding: 4px !important;
    line-height: 1 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.ul-close-checkout:hover {
    background: rgba(255, 255, 255, 0.2) !important;
}

.ul-one-step-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    padding: 18px;
    height: calc(90vh - 130px);
    max-height: calc(90vh - 130px);
    overflow: hidden;
    align-items: start;
}

.ul-one-step-col {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 16px;
    box-shadow: 0 8px 24px -14px rgba(15, 23, 42, 0.3);
    display: flex;
    flex-direction: column;
    flex: 1 1 0;
    min-height: 0;
}

.ul-cart-col,
.ul-checkout-col {
    overflow-y: auto;
    max-height: calc(90vh - 130px);
}

.ul-pane-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.ul-pane-head h4 {
    margin: 4px 0 0;
    font-size: 18px;
}

.ul-pane-head .ul-kicker {
    color: #475569;
}

.ul-pill {
    background: #e2e8f0;
    color: #0f172a;
    padding: 6px 10px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 13px;
}

.ul-cart-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    flex: 1 1 auto;
    min-height: 0;
    padding-right: 6px;
}

.ul-cart-card {
    position: relative;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    /* overflow: hidden; */
    background: #f8fafc;
}

.ul-cart-card .lead-card {
    border: none;
    box-shadow: none;
    margin: 0;
    cursor: pointer;
    background: #fff;
}

.ul-cart-remove {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #fee2e2;
    border: 1px solid #fecdd3;
    color: #b91c1c;
    cursor: pointer;
    font-weight: 800;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    opacity: 0.85;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.ul-cart-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-top: 1px dashed #e2e8f0;
    background: #fff;
    font-weight: 600;
    color: #0f172a;
}

.ul-cart-badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.ul-cart-card:hover .ul-cart-remove {
    opacity: 1;
    transform: scale(1.05);
}

.ul-cart-card .lead-card.is-collapsed .lead-card-content {
    display: none;
}

.ul-cart-card .lead-card.is-collapsed .lead-type-header {
    border-radius: 10px 10px 0 0;
}

.ul-cart-empty {
    padding: 16px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    color: #475569;
    text-align: center;
}

.ul-order-summary {
    margin-top: 14px;
    padding: 12px;
    border-radius: 10px;
    background: #0f172a;
    color: #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
}

.ul-order-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
}

.ul-order-row.ul-total-row,
.ul-order-row.total {
    font-size: 18px;
    color: #fff;
}

.ul-checkout-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-y: auto;
    flex: 1 1 auto;
    min-height: 0;
}

.ul-confetti-canvas {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.ul-field-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px 12px;
}

.ul-checkout-col .ul-field-grid {
    display: none;
}

.ul-checkout-form .form-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0;
}

.ul-checkout-form .input-text,
.ul-checkout-form select,
.ul-checkout-form textarea {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
    color: #0f172a;
    background: #fff;
}

.ul-payment-options {
    margin-top: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px;
    background: #f8fafc;
}

.ul-payment-head h4 {
    margin: 4px 0 10px;
}

.ul-payment-option {
    display: flex;
    gap: 10px;
    padding: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    margin-bottom: 8px;
    cursor: pointer;
    background: #fff;
}

.ul-payment-option input {
    margin-top: 6px;
}

.ul-payment-row {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: space-between;
}

.ul-payment-badges {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.ul-payment-title {
    font-weight: 700;
    color: #0f172a;
}

.ul-payment-pill {
    background: #e0f2fe;
    color: #075985;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.ul-payment-pill.is-error {
    background: #fee2e2;
    color: #991b1b;
}

.ul-payment-option.is-disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: #f8fafc;
    border-style: dashed;
}

.ul-payment-option.is-disabled * {
    pointer-events: none;
}

.ul-payment-desc {
    margin: 4px 0 0;
    color: #475569;
    font-size: 13px;
}

.ul-checkout-errors {
    display: none;
    padding: 16px 20px;
    border-radius: 12px;
    border: 1px solid #fee2e2;
    background: #fef2f2;
    color: #991b1b;
    font-weight: 500;
    margin-bottom: 24px;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(153, 27, 27, 0.08);
    position: relative;
    border-left: 4px solid #ef4444;
    z-index: 10;
}

.ul-checkout-errors.is-visible {
    display: block;
    animation: ulShake 0.4s cubic-bezier(.36, .07, .19, .97) both;
}

.ul-checkout-errors strong {
    color: #7f1d1d;
    font-weight: 700;
}

@keyframes ulShake {

    10%,
    90% {
        transform: translate3d(-1px, 0, 0);
    }

    20%,
    80% {
        transform: translate3d(2px, 0, 0);
    }

    30%,
    50%,
    70% {
        transform: translate3d(-4px, 0, 0);
    }

    40%,
    60% {
        transform: translate3d(4px, 0, 0);
    }
}

.ul-place-order {
    position: sticky;
    bottom: -16px;
    /* Offset parent padding */
    margin-top: 20px;
    width: 100%;
    z-index: 20;
    box-shadow: 0 -10px 20px rgba(255, 255, 255, 0.9), 0 4px 12px rgba(59, 130, 246, 0.3);
}

.ul-btn-primary,
.ul-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: 12px;
    border: none;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ul-btn-primary {
    background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
    color: #fff !important;
    box-shadow: 0 10px 25px -12px rgba(37, 99, 235, 0.6) !important;
    border-radius: 20px !important;
    border: none !important;
    width: 100%;
    text-align: center;
}

.ul-btn-primary.is-credit-mode {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
    color: #fff !important;
    box-shadow: 0 10px 25px -12px rgba(245, 158, 11, 0.6) !important;
}

.ul-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 30px -12px rgba(37, 99, 235, 0.65);
}

.ul-btn-secondary {
    background: #0f172a;
    color: #fff !important;
    border: 1px solid #1f2937;
}

.ul-btn-secondary:hover {
    color: #fff !important;
}

.ul-place-order {
    margin-top: 6px;
}

.ul-success-col {
    display: none;
    flex-direction: column;
    min-height: 0;
}

.ul-one-step-shell.is-success .ul-success-col {
    display: flex;
    grid-column: 1 / -1;
    height: 100%;
    overflow: hidden;
}

.ul-success-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.ul-one-step-shell.is-success .ul-cart-col,
.ul-one-step-shell.is-success .ul-checkout-col {
    display: none;
}

.ul-success-hero {
    /* Hidden because message is now in the main header */
    display: none !important;
}

#ul-success-leads {
    flex: 1;
    overflow-y: auto;
    padding: 4px;
    /* Space for shadows */
    margin-bottom: 20px;
}

.ul-success-actions {
    flex-shrink: 0;
    margin-top: auto;
    display: flex;
    gap: 12px;
}

.ul-success-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #22c55e;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

.ul-success-actions {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    flex-shrink: 0;
}

.ul-order-success-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 24px;
}

.ul-order-success .lead-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

@media (max-width: 1024px) {
    .ul-order-success .lead-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .ul-order-success .lead-grid {
        grid-template-columns: 1fr;
    }
}

.ul-order-success-head h3 {
    margin: 0;
}

.ul-order-sub {
    margin: 4px 0 0;
    color: #475569;
}

.ul-order-total {
    font-weight: 800;
    font-size: 20px;
    color: #0f172a;
}

.ul-order-kicker {
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.08em;
    color: #2563eb;
    margin: 0;
}

.ul-success-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 0;
}

#ul-success-leads {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding-right: 4px;
}

@media (max-width: 960px) {
    .ul-one-step-columns {
        grid-template-columns: 1fr;
        max-height: calc(90vh - 40px);
        overflow: auto;
        height: auto;
    }

    .ul-one-step-panel {
        max-height: 94vh;
    }

    .ul-success-actions {
        flex-direction: column;
    }
}

/* =========================================
   TOGGLE SWITCH (Filter Claimed)
   ========================================= */
.filter-group .ul-toggle-wrapper {
    display: flex;
    align-items: center;
    cursor: pointer;
    gap: 8px;
    padding: 0 4px;
    user-select: none;
    position: relative;
    font-size: 0.9rem;
    font-weight: 500;
    color: #475569;
}

.ul-toggle-wrapper input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.ul-toggle-slider {
    width: 36px;
    height: 20px;
    background-color: #cbd5e1;
    border-radius: 99px;
    position: relative;
    transition: 0.2s;
    flex-shrink: 0;
}

.ul-toggle-slider:before {
    content: "";
    position: absolute;
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    border-radius: 50%;
    transition: 0.2s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.ul-toggle-wrapper input:checked+.ul-toggle-slider {
    background-color: var(--lead-primary);
}

.ul-toggle-wrapper input:checked+.ul-toggle-slider:before {
    transform: translateX(16px);
}

.ul-toggle-wrapper:hover .ul-toggle-slider {
    background-color: #94a3b8;
}

.ul-toggle-wrapper input:checked:hover+.ul-toggle-slider {
    background-color: #2563eb;
    /* Slightly darker than primary */
}

/* Ensure proper vertical alignment with inputs in filter bar */
.toggle-group {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    /* Match input height */
}

/* =========================================
   PREMIUM LEAD VIEW ([lead_full_details])
   ========================================= */

.lead-premium-wrapper {
    font-family: 'Inter', sans-serif;
    max-width: 1000px;
    margin: 40px auto;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

/* Compact Header */
.lp-header {
    background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
    padding: 24px 32px;
    border-bottom: 1px solid #e2e8f0;
    position: relative;
    overflow: hidden;
}

.lp-header-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    position: relative;
    z-index: 2;
}

.lp-header-main {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Badges Row */
.lp-badges-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.lp-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.badge-unlocked {
    background: #dcfce7;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.badge-locked {
    background: #fff7ed;
    color: #ea580c;
    border: 1px solid #fed7aa;
}

.lp-date-mini {
    font-size: 0.85rem;
    color: #94a3b8;
    font-weight: 500;
}

/* Title */
.lp-title {
    font-size: 2rem;
    font-weight: 800;
    color: #0f172a;
    margin: 4px 0;
    line-height: 1.1;
    letter-spacing: -0.02em;
    max-width: 80%;
}

/* Location Row */
.lp-loc-row {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.lp-loc-item {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Header Tags (Type) */
.tag-type {
    background: #eff6ff;
    color: #2563eb;
    border: 1px solid #dbeafe;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

/* Header Action (Right Side) */
.lp-header-action {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    min-width: 140px;
}

.lp-price-tag {
    font-size: 1.5rem;
    font-weight: 800;
    color: #0f172a;
}

.lp-price-tag ins {
    text-decoration: none;
}

.lp-btn-buy {
    background: #2563eb;
    color: white;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2);
    font-size: 0.95rem;
    text-align: center;
    width: 100%;
}

.lp-btn-buy:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 6px 8px -1px rgba(37, 99, 235, 0.3);
    color: white;
}


/* Grid Layout */
.lp-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    /* More space for public description */
    border-top: none;
}

@media (max-width: 768px) {
    .lp-grid {
        grid-template-columns: 1fr;
    }

    .lp-header-content {
        flex-direction: column;
        align-items: stretch;
    }

    .lp-header-action {
        align-items: flex-start;
        margin-top: 10px;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .lp-header-action .lp-btn-buy {
        width: auto;
    }
}

.lp-card {
    padding: 32px;
}

.lp-public {
    background: #fff;
    /* Unified background */
    border-right: 1px solid #e2e8f0;
}

.lp-private {
    background: #f8fafc;
    /* Slight contrast for private/locked area */
    position: relative;
    border-left: 1px solid #fff;
    /* Highlight */
}

/* Sections */
.lp-section {
    margin-bottom: 32px;
}

.lp-section:last-child {
    margin-bottom: 0;
}

.lp-card h3 {
    font-size: 0.85rem;
    text-transform: uppercase;
    color: #94a3b8;
    font-weight: 700;
    letter-spacing: 0.05em;
    margin: 0 0 16px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.lp-lock-icon {
    color: #cbd5e1;
}

/* Description */
.lp-description {
    font-size: 1rem;
    line-height: 1.6;
    color: #334155;
}

.lp-description p {
    margin-bottom: 1em;
}

.lp-description p:last-child {
    margin-bottom: 0;
}

/* Data Rows */
.lp-data-rows {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 24px;
}

.lp-data-rows.vertical-stack {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.lp-row {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* Full Width Rows */
.lp-row.full-width {
    grid-column: 1 / -1;
    width: 100%;
}

.lp-row span {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 500;
}

.lp-row strong {
    font-size: 0.95rem;
    font-weight: 600;
    color: #0f172a;
}

/* Contact Box */
.lp-contact-box {
    display: flex;
    align-items: center;
    gap: 8px;
}

.lp-action-icon {
    color: #64748b;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s;
    background: #e2e8f0;
}

.lp-action-icon:hover {
    color: #2563eb;
    background: #dbeafe;
}

.lp-link {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
}

.lp-link:hover {
    text-decoration: underline;
}

/* Note Box */
.note-box {
    background: #fffbeb;
    border: 1px solid #fde68a;
    padding: 12px 16px;
    border-radius: 8px;
    margin-top: 8px;
}

.note-box span {
    color: #b45309;
    font-weight: 600;
}

.lp-note-content {
    font-size: 0.95rem;
    color: #78350f;
    margin-top: 4px;
    line-height: 1.5;
}

/* Attachments */
.lp-atts-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 6px;
}

.lp-att-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #475569;
    background: white;
    padding: 8px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
    border: 1px solid #e2e8f0;
    width: fit-content;
}

.lp-att-link:hover {
    border-color: #cbd5e1;
    color: #0f172a;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* BLURRED STATE */
.lp-private.is-blurred {
    overflow: hidden;
    user-select: none;
}

.lp-blur-overlay {
    filter: none;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 8px;
}

.lp-blur-overlay .lp-row {
    filter: blur(6px);
    opacity: 0.3;
}

.lp-cta-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(248, 250, 252, 0.4);
    /* Match private bg */
    flex-direction: column;
    text-align: center;
    padding: 20px;
    z-index: 10;
}

.lp-cta-overlay p {
    background: white;
    padding: 10px 20px;
    border-radius: 99px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    font-weight: 600;
    color: #475569;
    font-size: 0.9rem;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.lp-cta-overlay p::before {
    content: "🔒";
    font-size: 1rem;
}

/* =========================================
   ADVANCED TOOLTIPS
   ========================================= */
.has-tooltip {
    position: relative;
    cursor: help;
}

/* Tooltip Body */
.has-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    background: #1e293b;
    /* Dark Slate header color */
    color: white;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
    z-index: 100;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Tooltip Arrow */
.has-tooltip::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-4px);
    border-width: 4px;
    border-style: solid;
    border-color: #1e293b transparent transparent transparent;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 100;
}

/* Hover State */
.has-tooltip:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-12px);
}

.has-tooltip:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-4px);
}

/* =========================================
   PRODUCER ASSIGNMENT (Lead Detail)
   ========================================= */
.lp-card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
}

.lp-card-head h3 {
    margin: 0;
}

.lp-producer-assign-card {
    min-width: 240px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 14px;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
    display: block;
    align-self: flex-start;
}

.lp-header-assign {
    min-width: 260px;
}

.lp-producer-assign-title {
    font-weight: 700;
    color: #0f172a;
    font-size: 0.9rem;
}

.lp-producer-assign-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    align-items: start;
}

.lp-producer-assign-col {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.lp-producer-assign select {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 14px;
}

.lp-producer-assign button {
    width: 100%;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 12px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease;
}

.lp-producer-assign button:hover {
    background: #1d4ed8;
}

.lp-producer-assigned {
    background: #fff;
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.lp-producer-assigned-label {
    font-size: 12px;
    font-weight: 700;
    color: #475569;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.lp-producer-assigned-name {
    font-weight: 700;
    color: #111827;
}

.lp-no-producers {
    color: #64748b;
    margin: 0;
}

@media (max-width: 720px) {
    .lp-card-head {
        flex-direction: column;
    }

    .lp-producer-assign-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================
   SHORTCODE: [woo_leads_cart_button]
   ========================================= */
.ul-cart-button-wrapper {
    display: inline-flex;
    vertical-align: middle;
    padding: 2px;
    border-radius: 99px;
    transition: transform 0.3s ease, background-color 0.3s ease;
    position: relative;
    font-family: 'Inter', sans-serif;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.ul-cart-button {
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    padding: 6px 8px 6px 16px;
    /* Adjusted for right icon */
    border-radius: 99px;
    text-decoration: none !important;
    color: #1e293b;
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    z-index: 1;
}

/* Shine Sweep Overlay */
.ul-cart-button::after {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.4),
            transparent);
    transform: skewX(-20deg);
    transition: none;
    z-index: 2;
}

.ul-cart-button-wrapper.has-items .ul-cart-button::after {
    animation: ul-shine-sweep 4s infinite;
}

.ul-cart-button-inner {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Info Section */
.ul-cart-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    text-align: right;
    /* Align text towards the icon */
}

/* Icon Box */
.ul-cart-icon-box {
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ul-cart-icon-bg {
    position: absolute;
    inset: 0;
    background: #f1f5f9;
    border-radius: 50%;
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1), background-color 0.4s ease;
}

.ul-main-icon {
    width: 18px;
    height: 18px;
    color: #fff;
    position: relative;
    z-index: 2;
    transition: transform 0.3s ease, color 0.3s ease;
}

/* Badge */
.ul-cart-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #ef4444;
    color: white;
    font-size: 10px;
    font-weight: 800;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 2px solid #fff;
    z-index: 3;
    animation: ul-badge-pulse 2s infinite;
}

.ul-cart-status {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    white-space: nowrap;
}

.ul-status-dot {
    width: 6px;
    height: 6px;
    background: #22c55e;
    border-radius: 50%;
    display: inline-block;
}

.ul-cart-value {
    font-size: 0.95rem;
    font-weight: 800;
    color: #0f172a;
}

/* Glow Effect */
.ul-cart-glow {
    position: absolute;
    inset: -15px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.2) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
    z-index: -1;
}

/* States: Has Items */
.ul-cart-button-wrapper.has-items .ul-cart-button {
    background: #eff6ff;
    border-color: #bfdbfe;
    box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.1), 0 4px 6px -2px rgba(59, 130, 246, 0.05);
}

.ul-cart-button-wrapper.has-items .ul-cart-button:hover {
    border-color: #3b82f6;
    background: #fff;
}

.ul-cart-button-wrapper.has-items .ul-cart-glow {
    opacity: 1;
    /* Removed infinite animation to prevent constant paint overhead */
}

/* Reduce other infinite animations frequency or disable them if performance is critical */
.ul-cart-button-wrapper.has-items .ul-cart-icon-bg {
    background: #3b82f6;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
    /* animation: ul-icon-bg-pulse 4s infinite; Optional: slowed down */
}

/* Hover Effects */
.ul-cart-button:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.ul-cart-button:hover .ul-cart-icon-bg {
    transform: scale(1.1);
    background: #2563eb;
}

.ul-cart-button:hover .ul-main-icon {
    color: #fff;
    animation: none;
    /* Pause continuous animation on hover */
    transform: rotate(-10deg) scale(1.1);
}

/* Animations */
@keyframes ul-shine-sweep {
    0% {
        left: -150%;
    }

    15% {
        left: 150%;
    }

    100% {
        left: 150%;
    }
}

@keyframes ul-cart-shake {

    0%,
    85%,
    100% {
        transform: rotate(0);
    }

    88% {
        transform: rotate(-15deg);
    }

    91% {
        transform: rotate(15deg);
    }

    94% {
        transform: rotate(-10deg);
    }

    97% {
        transform: rotate(10deg);
    }
}

@keyframes ul-badge-pulse {

    0%,
    100% {
        transform: scale(1);
    }

    10%,
    20% {
        transform: scale(1.2);
    }
}

@keyframes ul-pulse-glow {

    0%,
    100% {
        transform: scale(0.9);
        opacity: 0.4;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.7;
    }
}

@keyframes ul-icon-bg-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(59, 130, 246, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
    }
}

/* Empty State Polish */
.ul-cart-button-wrapper.is-empty .ul-cart-button {
    opacity: 0.8;
}

.ul-cart-button-wrapper.is-empty:hover {
    opacity: 1;
}

.ul-cart-button-wrapper.is-empty .ul-cart-value {
    color: #64748b;
}

/* Responsive */
@media (max-width: 480px) {
    .ul-cart-info {
        display: none;
    }

    .ul-cart-button {
        padding: 6px;
    }
}



/* PURCHASED LEADS VIEW DETAILS BUTTON */

.lead-card .btn-view-lead {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    width: 100% !important;
    text-align: center !important;
    background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
    color: #f8fafc !important;
    padding: 12px 14px !important;
    border-radius: 10px !important;
    border: 1px solid #1d4ed8 !important;
    font-weight: 700 !important;
    letter-spacing: 0.01em !important;
    text-decoration: none !important;
    margin-top: 10px !important;
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.25), 0 4px 12px rgba(0, 0, 0, 0.08) !important;
    position: relative !important;
    overflow: hidden !important;
    isolation: isolate !important;
    transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease !important;
}

.lead-card .btn-view-lead::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.18), transparent 45%);
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 0;
}

.lead-card .btn-view-lead::after {
    content: "→";
    font-size: 14px;
    transition: transform 0.15s ease;
    z-index: 1;
}

.lead-card .btn-view-lead:hover {
    transform: translateY(-1px);
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    box-shadow: 0 16px 36px rgba(30, 64, 175, 0.3), 0 6px 14px rgba(0, 0, 0, 0.1);
}

.lead-card .btn-view-lead:hover::before {
    opacity: 1;
}

.lead-card .btn-view-lead:hover::after {
    transform: translateX(4px);
}

.lead-card .btn-view-lead:active {
    transform: translateY(0);
    box-shadow: 0 10px 20px rgba(30, 64, 175, 0.24);
}

.lead-card .btn-view-lead:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.35);
    outline-offset: 2px;
}

/* =========================================
   COMPACT / WIDGET VIEW
   ========================================= */
.lead-card-compact .lead-details-grid,
.lead-card-compact .lead-summary-compact,
.lead-card-compact .lead-type-badge {
    display: none;
}

.lead-card-compact .lead-type-header {
    padding: 12px;
    border-bottom: none;
    background: transparent;
}

.lead-card-compact .lead-card-content {
    padding: 0 12px 12px;
}

.lead-card-compact .btn-view-lead {
    display: block;
    width: 100%;
    margin-top: 8px;
    text-align: center;
    background: #f1f5f9;
    color: #475569;
    font-size: 0.8rem;
    padding: 6px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s;
}

.lead-card-compact .btn-view-lead:hover {
    background: #e2e8f0;
    color: #1e293b;
}

/* Title Styling */
.lead-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 4px;
    line-height: 1.3;
}

/* Adjust header meta in compact view */
.lead-card-compact .lead-header-meta {
    gap: 4px;
}

.lead-card-compact .lead-location-text {
    font-size: 0.8rem;
}

.lead-card-compact .lead-date-text {
    font-size: 0.75rem;
    color: #94a3b8;
}

/* =========================================
   COMPACT / WIDGET VIEW (LIST STYLE)
   ========================================= */
.lead-card-compact {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 10px 14px !important;
    min-height: 56px !important;
    gap: 12px !important;
}

/* Hide Elements */
.lead-card-compact .lead-details-grid,
.lead-card-compact .lead-summary-compact,
.lead-card-compact .lead-type-badge,
.lead-card-compact .lead-date-text,
.lead-card-compact svg.w-4 {
    display: none !important;
}

/* Header (Left Side) */
.lead-card-compact .lead-type-header {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: flex-start !important;
    gap: 0 !important;
}

.lead-card-compact .lead-header-meta {
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
    align-items: flex-start !important;
}

.lead-card-title {
    font-size: 0.95rem !important;
    margin: 0 !important;
    line-height: 1.2 !important;
    color: #0f172a !important;
}

.lead-card-compact .lead-location-text {
    font-size: 0.75rem !important;
    color: #64748b !important;
    display: block !important;
}

.lead-card-compact .lead-sub-meta {
    display: none !important;
    /* Hide date wrapper if empty */
}

/* Content (Right Side - Button) */
.lead-card-compact .lead-card-content {
    padding: 0 !important;
    flex-grow: 0 !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
}

.lead-card-compact .btn-view-lead {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    background: #f1f5f9 !important;
    color: #64748b !important;
    padding: 0 !important;
    margin: 0 !important;
    font-size: 14px !important;
    transition: all 0.2s ease !important;
}

.lead-card-compact .btn-view-lead:hover {
    background: #e2e8f0 !important;
    color: #0f172a !important;
    transform: translateX(2px) !important;
}

/* =========================================
   COMPACT VIEW REFINEMENTS (ICONS & BADGES)
   ========================================= */

/* Header Row for Name + Type */
.lead-card-compact .lead-header-row {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin-bottom: 2px !important;
}

/* Compact Type Badge */
.lead-card-compact .compact-type-badge {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    background: #e0f2fe !important;
    color: #0284c7 !important;
    font-size: 0.65rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    padding: 2px 6px !important;
    border-radius: 4px !important;
    letter-spacing: 0.05em !important;
    line-height: 1 !important;
    white-space: nowrap !important;
}

.lead-card-compact .compact-type-badge svg {
    width: 10px !important;
    height: 10px !important;
    display: block !important;
}

/* Location Icon Fix */
.lead-card-compact .lead-location-text {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
}

.lead-card-compact .lead-location-text svg {
    display: block !important;
    width: 12px !important;
    height: 12px !important;
    color: #94a3b8 !important;
}

/* Ensure Pricing Hidden */
.lead-card-compact .lead-header-price,
.lead-card-compact .lead-price-stack {
    display: none !important;
}

/* =========================================
   CLICKABLE COMPACT CARD REFINEMENTS
   ========================================= */

/* Add Spacing Between Cards */
a.lead-card-compact {
    margin-bottom: 12px !important;
    cursor: pointer !important;
    transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease !important;
    text-decoration: none !important;
    color: inherit !important;
    display: flex !important;
    /* Re-affirm flex display on the anchor */
}

/* Hover Effect for Entire Card */
a.lead-card-compact:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
    background-color: #f8fafc !important;
    border-color: #cbd5e1 !important;
}

/* Ensure no weird link colors on text */
a.lead-card-compact h4,
a.lead-card-compact span,
a.lead-card-compact div {
    color: inherit !important;
}

/* Make sure Title is dark */
a.lead-card-compact .lead-card-title {
    color: #0f172a !important;
}

/* Make sure Location is muted */
a.lead-card-compact .lead-location-text {
    color: #64748b !important;
}

/* Arrow/Chevron Replacement */
/* Since we removed the button, let's add a pseudo-element chevron to the right */
a.lead-card-compact::after {
    content: '' !important;
    width: 24px !important;
    height: 24px !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M9 5l7 7-7 7' /%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: contain !important;
    margin-left: auto !important;
    /* Push to right */
    flex-shrink: 0 !important;
}

a.lead-card-compact:hover::after {
    /* Optionally darken chevron on hover */
    filter: brightness(0.7) !important;
}

/* Hide the old content wrapper if it's empty now? No, we still use it for potential structure, but force flex order */
.lead-card-compact .lead-card-content {
    display: none !important;
    /* Hide the content wrapper entirely since we removed the button and grid */
}

/* =========================================
   BADGES (CUSTOM FIELDS)
   ========================================= */
.ul-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 8px;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.2;
    text-transform: capitalize;
    letter-spacing: 0.02em;
}

.ul-badge small {
    display: inline-block;
    font-size: 0.8em;
    line-height: 1.1;
}

/* Success (Yes) - Green */
.ul-badge-success {
    background-color: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

/* Neutral (No) - Gray */
.ul-badge-neutral {
    background-color: #f1f5f9;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

/* Info (Requested/Yes/Info) - Blue */
.ul-badge-info {
    background-color: #dbeafe;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

/* Warning (Not Confirmed/Warning) - Yellow/Orange */
.ul-badge-warning {
    background-color: #fef9c3;
    color: #854d0e;
    border: 1px solid #fde047;
}

/* Error (Alert) - Red */
.ul-badge-error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* =========================================
   META LISTS STYLING (Premium Look)
   ========================================= */
.lead-meta-lists {
    display: table;
    /* Use table layout or flex to structure */
    width: 100%;
    margin-top: 12px;
    /* border-top: 1px dashed #e2e8f0; */
    padding-top: 16px;
    gap: 16px;
}

/* Individual List Block */
.lead-meta-list {
    /* margin-bottom: 16px; */
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #f1f5f9;
    overflow: hidden;
}

.lead-meta-list:last-child {
    margin-bottom: 0;
}

/* Header with Icon */
.meta-list-title {
    font-size: 0.77rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 8px 12px;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    border-bottom: 1px solid #f1f5f9;
}

/* Specific Header Colors */
.lead-positive-factors .meta-list-title {
    background: #f0fdf4;
    color: #166534;
    border-color: #dcfce7;
}

.lead-challenges .meta-list-title {
    background: #fef2f2;
    color: #991b1b;
    border-color: #fee2e2;
}

.lead-notes .meta-list-title {
    background: #eff6ff;
    color: #1e40af;
    border-color: #dbeafe;
}

/* The List Itself */
.lead-meta-list ul {
    list-style: none;
    padding: 4px 8px;
    margin: 0;
    background: #fff;
}

.lead-meta-list li {
    font-size: 0.75rem;
    color: #334155;
    padding-left: 14px;
    position: relative;
    margin-bottom: 6px;
    line-height: 1.5;
}

.lead-meta-list li:last-child {
    margin-bottom: 0;
}

/* Custom bullet logic */
.lead-meta-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    top: 0px;
    font-weight: bold;
}

/* Colorize bullets based on parent */
.lead-positive-factors li::before {
    color: #16a34a;
}

.lead-challenges li::before {
    color: #dc2626;
}

.lead-notes li::before {
    color: #2563eb;
}

/* Grid layout for the lists if space allows (Table View or Expanded Card) */
.lead-grid:not(.lead-card-compact) .lead-meta-lists {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

/* Compact Adjustments */
.lead-card-compact .lead-meta-lists {
    display: none;
    /* Usually hidden in compact view, but if forced, stack them */
}