﻿/* =========================================
   HOME DASHBOARD
   Archivo completo: home-dashboard.css
========================================= */

.home-dashboard-v2 {
    padding: 32px 0 56px;
}

/* =========================================
   BLOQUES PRINCIPALES
========================================= */

.home-hero-v2,
.home-platforms-v2,
.home-contracts-v2 {
    background: #ffffff;
    border: 1px solid #e2e7de;
    border-radius: 28px;
    box-shadow: 0 18px 40px rgba(23, 24, 23, 0.06);
    overflow: hidden;
}

.home-hero-v2 {
    padding: 34px;
}

.home-platforms-v2 {
    display: flex;
    width: 100%;
    flex-direction: column;
}

.home-contracts-v2 {
    padding: 28px;
}

/* =========================================
   BADGES Y TITULOS
========================================= */

.home-badge-v2 {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(109, 179, 76, 0.12);
    color: #6db34c;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.home-heading-group-v2 {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.home-section-title-v2 {
    margin: 0 !important;
    font-weight: 900 !important;
    line-height: 1.12;
}

.home-title-v2 {
    margin: 0;
    font-size: clamp(2.3rem, 4vw, 3.8rem);
    line-height: 1.04;
    font-weight: 900;
    color: #171817;
}

.home-subtitle-v2 {
    margin: 16px 0 0;
    font-size: clamp(1.3rem, 2vw, 2rem);
    line-height: 1.2;
    font-weight: 700;
    color: #667063;
}

.home-text-v2 {
    margin: 22px 0 0;
    max-width: 95%;
    font-size: 1.08rem;
    line-height: 1.75;
    color: #2b2e2b;
}

/* =========================================
   HEADER PLATAFORMAS
========================================= */

.home-platforms-header-v2 {
    padding: 28px 28px 22px !important;
    display: flex;
    flex-direction: column;
    gap: 20px !important;
}

.home-filters-v2 {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px !important;
    width: 100%;
}

.home-filter-label-v2 {
    display: inline-block;
    margin-bottom: 10px;
    font-weight: 700;
    color: #171817;
}

.home-search-box-v2 {
    min-height: 54px !important;
    border: 1px solid #d7ddd2 !important;
    border-radius: 16px !important;
    background: #fff !important;
    box-shadow: none !important;
    transition: .2s ease;
}

    .home-search-box-v2:focus-within {
        border-color: #6db34c !important;
        box-shadow: 0 0 0 4px rgba(109, 179, 76, 0.10) !important;
    }

    .home-search-box-v2 .input-correo {
        border: 0 !important;
        box-shadow: none !important;
        background: transparent !important;
        padding: 0 !important;
        min-height: auto !important;
    }

/* =========================================
   GRID PLATAFORMAS
========================================= */

.home-platform-grid-v2 {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(220px, 1fr)) !important;
    gap: 18px !important;
    width: 100%;
    padding: 24px !important;
    background: linear-gradient(180deg, #fbfcfa 0%, #f6f9f4 100%);
    box-sizing: border-box;
}

    .home-platform-grid-v2 .contenedor-plataforma-search,
    .home-platform-card-v2 {
        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;
        min-height: 305px;
        display: flex !important;
        flex-direction: column;
        justify-content: flex-start;
        border-radius: 22px !important;
        border: 1px solid #d9dfd4 !important;
        background: #fff !important;
        text-decoration: none !important;
        box-shadow: 0 10px 24px rgba(23, 24, 23, 0.05);
        overflow: hidden;
        transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
    }

        .home-platform-grid-v2 .contenedor-plataforma-search:hover,
        .home-platform-card-v2:hover {
            transform: translateY(-4px);
            box-shadow: 0 18px 30px rgba(23, 24, 23, 0.10);
            border-color: #c8d4c0 !important;
        }

.home-platform-image-wrap-v2 {
    min-height: 156px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    padding: 10px;
}

.home-platform-grid-v2 .img-plataforma-search {
    width: 100%;
    height: 132px !important;
    object-fit: contain;
    padding: 10px;
}

.home-platform-grid-v2 .plataform-data {
    display: flex;
    flex-direction: column;
    gap: 8px !important;
    padding: 18px 16px 20px !important;
    min-width: 0;
    flex: 1;
}

.home-platform-grid-v2 .nombre-plataforma {
    font-weight: 800 !important;
    color: #171817;
    line-height: 1.3;
    min-height: 44px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.home-platform-grid-v2 .tipo-animal {
    color: #556053;
    line-height: 1.35;
}

/* =========================================
   CONTRATOS - PANEL
========================================= */

.contracts-panel-fix {
    width: 100%;
    border-radius: 28px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfcfa 100%);
    border: 1px solid #e4e7df;
    box-shadow: 0 16px 36px rgba(23, 24, 23, 0.06);
}

.home-contracts-top-v2 {
    display: flex;
    flex-direction: column;
    gap: 22px;
    width: 100%;
}

.contracts-toolbar-fix {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    width: 100%;
}

.contracts-search-fix {
    max-width: 340px;
    width: 100%;
}

.contracts-search-box-fix {
    min-height: 54px !important;
    border-radius: 16px !important;
}

.contracts-btn-fix {
    min-height: 54px;
    padding: 0 22px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    font-weight: 800;
    box-shadow: 0 12px 24px rgba(109, 179, 76, 0.18);
}

/* =========================================
   CONTRATOS - TABLA DESKTOP
========================================= */

.contracts-table-wrapper {
    width: 100%;
    overflow-x: auto;
    border: 1px solid #e8ece5;
    border-radius: 22px;
    background: #fff;
}

.contracts-table-modern {
    min-width: 820px;
    margin-bottom: 0;
    --bs-table-bg: transparent;
    --bs-table-hover-bg: rgba(109, 179, 76, 0.05);
    --bs-table-border-color: #edf1ea;
}

    .contracts-table-modern thead th {
        background: #f8faf7;
        color: #697465;
        font-size: .88rem;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: .03em;
        padding: 1rem 1.1rem;
        white-space: nowrap;
        border-bottom: 1px solid #e5ebe2;
    }

    .contracts-table-modern tbody td {
        padding: 1rem 1.1rem;
        border-bottom: 1px solid #edf1ea;
        color: #20251f;
        font-weight: 600;
        vertical-align: middle;
    }

    .contracts-table-modern tbody tr:last-child td {
        border-bottom: 0;
    }

.contracts-link-fix {
    display: inline-flex;
    align-items: center;
    color: #2a7f46;
    font-weight: 800;
    text-decoration: none;
}

    .contracts-link-fix:hover {
        color: #1f6938;
        text-decoration: none;
    }

.contracts-country-fix {
    display: inline-flex;
    align-items: center;
    color: #273126;
    font-weight: 700;
}

.contracts-ellipsis-fix {
    display: inline-block;
    max-width: 260px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    vertical-align: middle;
}

.contracts-status-fix {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 16px;
    border-radius: 999px;
    font-size: .92rem;
    font-weight: 800;
}

.contracts-clickable-fix {
    cursor: pointer;
    text-decoration: none;
}

.contracts-empty-fix {
    min-height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #6f786c;
    font-size: 1rem;
    font-weight: 700;
}

    .contracts-empty-fix i {
        color: #6db34c;
        font-size: 1.15rem;
    }

/* =========================================
   CONTRATOS - MOBILE CARDS
========================================= */

.contracts-mobile-list-fix {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.contracts-mobile-card-fix {
    background: #fff;
    border: 1px solid #e8ece5;
    border-radius: 20px;
    padding: 16px;
    box-shadow: 0 10px 22px rgba(23, 24, 23, 0.05);
}

.contracts-mobile-header-fix {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.contracts-mobile-body-fix {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.contracts-mobile-item-fix {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 14px;
    border-radius: 16px;
    background: #f8faf7;
    min-width: 0;
}

.contracts-mobile-item-full-fix {
    grid-column: 1 / -1;
}

.contracts-mobile-label-fix {
    font-size: .76rem;
    font-weight: 800;
    color: #7a8476;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.contracts-mobile-value-fix {
    font-size: .96rem;
    font-weight: 700;
    color: #212620;
    word-break: break-word;
}

.contracts-empty-mobile-fix {
    min-height: 130px;
    border: 1px dashed #d9dfd4;
    border-radius: 18px;
    background: #fff;
}

/* =========================================
   PAGINACION
========================================= */

#pagination-container {
    width: 100%;
    display: flex;
    justify-content: center;
    padding-top: 12px;
}

/* =========================================
   RESPONSIVE
========================================= */

@media (max-width: 1399.98px) {
    .home-platform-grid-v2 {
        grid-template-columns: repeat(3, minmax(120px, 1fr)) !important;
    }
}

@media (max-width: 1199.98px) {
    .home-text-v2 {
        max-width: 100%;
    }

    .home-platform-grid-v2 {
        grid-template-columns: repeat(2, minmax(220px, 1fr)) !important;
    }
}

@media (max-width: 991.98px) {
    .home-hero-v2,
    .home-contracts-v2 {
        padding: 22px;
        border-radius: 24px;
    }

    .home-platforms-header-v2 {
        padding: 22px !important;
    }

    .home-filters-v2 {
        grid-template-columns: 1fr !important;
    }

    .contracts-toolbar-fix {
        flex-direction: column;
        align-items: stretch;
    }

    .contracts-search-fix {
        max-width: 100%;
    }

    .contracts-btn-fix {
        width: 100%;
    }
}

@media (max-width: 767.98px) {
    .home-platform-grid-v2 {
        grid-template-columns: 1fr !important;
        padding: 16px !important;
    }

        .home-platform-grid-v2 .contenedor-plataforma-search,
        .home-platform-card-v2 {
            min-height: 270px;
        }

    .home-platform-image-wrap-v2 {
        min-height: 132px;
    }

    .home-platform-grid-v2 .img-plataforma-search {
        height: 112px !important;
    }
}

@media (max-width: 575.98px) {
    .home-dashboard-v2 {
        padding: 18px 0 34px;
    }

    .home-hero-v2,
    .home-contracts-v2 {
        padding: 18px 14px;
        border-radius: 20px;
    }

    .home-platforms-header-v2 {
        padding: 18px 14px !important;
    }

    .home-platform-grid-v2 {
        gap: 12px !important;
        padding: 12px !important;
    }

        .home-platform-grid-v2 .contenedor-plataforma-search,
        .home-platform-card-v2 {
            min-height: 240px;
            border-radius: 18px !important;
        }

    .contracts-mobile-card-fix {
        padding: 14px;
        border-radius: 18px;
    }

    .contracts-mobile-header-fix {
        flex-direction: column;
        align-items: stretch;
    }

    .contracts-mobile-body-fix {
        grid-template-columns: 1fr;
    }

    .contracts-status-fix {
        width: fit-content;
    }
}
