/* ============================================================
   FULLCARRO CRM DASHBOARD STYLES
   ============================================================ */

/* FC: Botones de contacto bloqueados (visitantes anónimos)
   Heredan el aspecto normal pero el cursor indica que abrirán algo. */
.fc-locked-action {
    cursor: pointer !important;
    position: relative;
}
.fc-locked-action::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none; /* el click pasa al elemento padre que tiene el handler */
}


/* ---------- Layout ---------- */
.fc-crm {
    padding: 0 0 60px;
    font-family: 'Inter', sans-serif;
}

.fc-crm__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ---------- Page Header ---------- */
.fc-crm__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 32px 0 24px;
    border-bottom: 1px solid #EAF0F5;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 16px;
}

.fc-crm__header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.fc-crm__avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    background: #EAF0F5;
    flex-shrink: 0;
}

.fc-crm__avatar-placeholder {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2A3946 0%, #455867 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.fc-crm__avatar-placeholder svg {
    width: 28px;
    height: 28px;
    fill: #fff;
    opacity: 0.8;
}

.fc-crm__user-name {
    font-size: 22px;
    font-weight: 700;
    color: #2A3946;
    margin: 0 0 4px;
    line-height: 1.2;
}

.fc-crm__user-meta {
    font-size: 13px;
    color: #73818C;
    margin: 0;
}

.fc-crm__header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.fc-crm__title-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #1e3a5f 0%, #2A3946 100%);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 20px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.fc-crm__title-badge svg {
    width: 14px;
    height: 14px;
    fill: #fff;
}

/* ---------- Summary Stats Cards ---------- */
.fc-crm__summary {
    margin-bottom: 40px;
}

.fc-crm__summary-title {
    font-size: 13px;
    font-weight: 600;
    color: #73818C;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 0 16px;
}

.fc-crm__cards {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
}

@media (max-width: 1100px) {
    .fc-crm__cards {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 640px) {
    .fc-crm__cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

.fc-crm-card {
    background: #fff;
    border: 1px solid #EAF0F5;
    border-radius: 12px;
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: box-shadow 0.2s, transform 0.2s;
    position: relative;
    overflow: hidden;
}

.fc-crm-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--fc-card-color, #EAF0F5);
    border-radius: 12px 12px 0 0;
}

.fc-crm-card:hover {
    box-shadow: 0 4px 20px rgba(42, 57, 70, 0.08);
    transform: translateY(-2px);
}

.fc-crm-card--vehicles { --fc-card-color: #2A3946; }
.fc-crm-card--views    { --fc-card-color: #5B8DEF; }
.fc-crm-card--calls    { --fc-card-color: #27AE60; }
.fc-crm-card--whatsapp { --fc-card-color: #25D366; }
.fc-crm-card--email    { --fc-card-color: #E67E22; }
.fc-crm-card--leads    { --fc-card-color: #F09965; }

.fc-crm-card__icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--fc-card-bg, #EAF0F5);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.fc-crm-card--vehicles .fc-crm-card__icon { background: rgba(42, 57, 70, 0.08); }
.fc-crm-card--views .fc-crm-card__icon    { background: rgba(91, 141, 239, 0.1); }
.fc-crm-card--calls .fc-crm-card__icon    { background: rgba(39, 174, 96, 0.1); }
.fc-crm-card--whatsapp .fc-crm-card__icon { background: rgba(37, 211, 102, 0.1); }
.fc-crm-card--email .fc-crm-card__icon    { background: rgba(230, 126, 34, 0.1); }
.fc-crm-card--leads .fc-crm-card__icon    { background: rgba(240, 153, 101, 0.1); }

.fc-crm-card__icon svg {
    width: 18px;
    height: 18px;
}

.fc-crm-card--vehicles .fc-crm-card__icon svg { fill: #2A3946; }
.fc-crm-card--views .fc-crm-card__icon svg    { fill: #5B8DEF; }
.fc-crm-card--calls .fc-crm-card__icon svg    { fill: #27AE60; }
.fc-crm-card--whatsapp .fc-crm-card__icon svg { fill: #25D366; }
.fc-crm-card--email .fc-crm-card__icon svg    { fill: #E67E22; }
.fc-crm-card--leads .fc-crm-card__icon svg    { fill: #F09965; }

.fc-crm-card__value {
    font-size: 32px;
    font-weight: 800;
    color: #2A3946;
    line-height: 1;
}

.fc-crm-card__label {
    font-size: 12px;
    color: #73818C;
    font-weight: 500;
    margin: 0;
}

/* ---------- Table Section ---------- */
.fc-crm__table-section {
    background: #fff;
    border: 1px solid #EAF0F5;
    border-radius: 16px;
    overflow: hidden;
}

.fc-crm__table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #EAF0F5;
    flex-wrap: wrap;
    gap: 12px;
}

.fc-crm__table-title {
    font-size: 16px;
    font-weight: 700;
    color: #2A3946;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.fc-crm__table-title svg {
    width: 18px;
    height: 18px;
    fill: #455867;
}

.fc-crm__table-count {
    background: #EAF0F5;
    color: #455867;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 20px;
}

/* Table */
.fc-crm-table {
    width: 100%;
    border-collapse: collapse;
}

.fc-crm-table thead tr {
    background: #F8FAFB;
}

.fc-crm-table thead th {
    padding: 12px 16px;
    font-size: 11px;
    font-weight: 700;
    color: #73818C;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    text-align: left;
    white-space: nowrap;
    border-bottom: 1px solid #EAF0F5;
}

.fc-crm-table thead th:first-child {
    padding-left: 24px;
}

.fc-crm-table thead th:last-child {
    padding-right: 24px;
}

.fc-crm-table tbody tr {
    border-bottom: 1px solid #F0F5F8;
    transition: background 0.15s;
}

.fc-crm-table tbody tr:last-child {
    border-bottom: none;
}

.fc-crm-table tbody tr:hover {
    background: #FAFCFD;
}

.fc-crm-table tbody td {
    padding: 16px;
    vertical-align: middle;
    font-size: 14px;
    color: #2A3946;
}

.fc-crm-table tbody td:first-child {
    padding-left: 24px;
}

.fc-crm-table tbody td:last-child {
    padding-right: 24px;
}

/* Vehicle cell */
.fc-crm-vehicle {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 200px;
}

.fc-crm-vehicle__thumb {
    width: 56px;
    height: 40px;
    border-radius: 6px;
    object-fit: cover;
    background: #EAF0F5;
    flex-shrink: 0;
}

.fc-crm-vehicle__thumb-placeholder {
    width: 56px;
    height: 40px;
    border-radius: 6px;
    background: #EAF0F5;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.fc-crm-vehicle__thumb-placeholder svg {
    width: 20px;
    height: 20px;
    fill: #B0C4D0;
}

.fc-crm-vehicle__name {
    font-size: 14px;
    font-weight: 600;
    color: #2A3946;
    text-decoration: none;
    line-height: 1.3;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
}

.fc-crm-vehicle__name:hover {
    color: #F09965;
    text-decoration: none;
}

.fc-crm-vehicle__date {
    font-size: 11px;
    color: #9AADB8;
    margin-top: 2px;
}

/* Status badges */
.fc-crm-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    white-space: nowrap;
}

.fc-crm-status::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
}

.fc-crm-status--publish {
    background: rgba(39, 174, 96, 0.1);
    color: #27AE60;
}

.fc-crm-status--pending {
    background: rgba(230, 126, 34, 0.1);
    color: #E67E22;
}

.fc-crm-status--draft {
    background: rgba(115, 129, 140, 0.1);
    color: #73818C;
}

/* Stat cells */
.fc-crm-stat {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #2A3946;
    white-space: nowrap;
}

.fc-crm-stat__icon {
    display: flex;
    align-items: center;
}

.fc-crm-stat__icon svg {
    width: 14px;
    height: 14px;
}

.fc-crm-stat--views svg    { fill: #5B8DEF; }
.fc-crm-stat--calls svg    { fill: #27AE60; }
.fc-crm-stat--whatsapp svg { fill: #25D366; }
.fc-crm-stat--email svg    { fill: #E67E22; }
.fc-crm-stat--favorites svg { fill: #EB5757; }

.fc-crm-stat--zero {
    color: #B0C4D0;
    font-weight: 400;
}

/* Total leads cell */
.fc-crm-leads-total {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 28px;
    padding: 0 10px;
    background: #F09965;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    border-radius: 20px;
}

.fc-crm-leads-total--zero {
    background: #EAF0F5;
    color: #9AADB8;
}

/* Mobile responsive table */
@media (max-width: 900px) {
    .fc-crm-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .fc-crm-vehicle {
        min-width: 160px;
    }
}

/* Empty state */
.fc-crm__empty {
    text-align: center;
    padding: 60px 20px;
}

.fc-crm__empty-icon {
    width: 64px;
    height: 64px;
    background: #EAF0F5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.fc-crm__empty-icon svg {
    width: 28px;
    height: 28px;
    fill: #B0C4D0;
}

.fc-crm__empty-text {
    font-size: 15px;
    color: #73818C;
    margin: 0 0 20px;
}

.fc-crm__empty-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #2A3946;
    color: #fff;
    padding: 10px 22px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
}

.fc-crm__empty-btn:hover {
    background: #F09965;
    color: #fff;
    text-decoration: none;
}

/* Navigation link in panel menu */
.listivo-panel-menu__item--crm {
    position: relative;
}

.listivo-panel-menu__item--crm-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #F09965;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    position: absolute;
    top: -4px;
    right: -4px;
    line-height: 1;
}

/* Enhanced stat pills in listing_card_v2 */
.fc-stat-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #F0F5F8;
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 600;
    color: #455867;
    white-space: nowrap;
}

.fc-stat-pill svg {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
}

.fc-stat-pill--whatsapp {
    background: rgba(37, 211, 102, 0.08);
    color: #1DA851;
}

.fc-stat-pill--whatsapp svg { fill: #25D366; }

.fc-stat-pill--email {
    background: rgba(230, 126, 34, 0.08);
    color: #C0692A;
}

.fc-stat-pill--email svg { fill: #E67E22; }

.fc-stat-pill--calls {
    background: rgba(39, 174, 96, 0.08);
    color: #1E9456;
}

.fc-stat-pill--calls svg { fill: #27AE60; }

/* Listing card v2 extended stats */
.listivo-panel-listing-card-v2__leads {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #F0F5F8;
}

/* Back button on CRM page */
.fc-crm__back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #73818C;
    text-decoration: none;
    padding: 6px 12px;
    border: 1px solid #EAF0F5;
    border-radius: 8px;
    transition: all 0.2s;
    background: #fff;
}

.fc-crm__back-btn svg {
    width: 12px;
    height: 12px;
    fill: #73818C;
    transform: rotate(180deg);
}

.fc-crm__back-btn:hover {
    border-color: #2A3946;
    color: #2A3946;
    text-decoration: none;
}

.fc-crm__back-btn:hover svg {
    fill: #2A3946;
}
