/* =========================================
   CONFIGURACIÓN GENERAL
   ========================================= */
.tep-contenedor-global {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
    font-family: 'Segoe UI', system-ui, sans-serif;
    color: #1e293b;
}

/* =========================================
   1. KPI DASHBOARD
   ========================================= */
.tep-kpi-dashboard {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 0 auto 40px;
    flex-wrap: wrap;
    z-index: 3;
    position: relative;
    max-width: 900px;
    width: 100%;
}

.tep-kpi-card {
    background: white;
    border-radius: 16px;
    padding: 20px 30px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
    border: 2px solid #ebeff5;
    flex: 1;
    min-width: 240px;
    max-width: 350px;
    transition: transform 0.2s;
    z-index: 3;
    position: relative;
}

.tep-kpi-card:hover {
    transform: translateY(-3px);
}

.tep-kpi-icon-wrapper {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.tep-kpi-icon-wrapper.vino {
    background: #fdf2f8;
    color: #861542;
}

.tep-kpi-icon-wrapper.azul {
    background: #e0f2fe;
    color: #0284c7;
}

.tep-kpi-icon-wrapper.verde {
    background: #dcfce7;
    color: #16a34a;
}

.tep-kpi-content {
    display: flex;
    flex-direction: column;
}

.tep-kpi-number {
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1;
    color: #1e293b;
}

.tep-kpi-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    margin-top: 4px;
}

/* =========================================
   3. TARJETA HORIZONTAL
   ========================================= */
.tep-lista-proyectos {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.tep-project-card-horizontal:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    border-color: #cbd5e1;
}

.tep-status-stripe {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 6px;
    background: #861542;
    border-top-left-radius: 16px;
    border-bottom-left-radius: 16px;
}

.tep-status-stripe.completed {
    background: #16a34a;
}

.tep-col-info {
    flex: 4;
    padding-right: 10px;
    padding-left: 15px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.tep-header-badges {
    display: flex;
    gap: 10px;
    margin-bottom: 8px;
    align-items: center;
}

.tep-badge-status {
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tep-badge-status.process {
    background: #fff7ed;
    color: #ffc107;
    border: 1px solid #ffedd5;
}

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

.tep-badge-date {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tep-col-progress {
    flex: 2.5;
    padding: 0 20px;
    border-left: 1px solid #f1f5f9;
    border-right: 1px solid #f1f5f9;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.tep-progress-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
}

.tep-percent-text {
    color: #861542;
}

.tep-progress-track {
    height: 10px;
    background: #f1f5f9;
    border-radius: 10px;
    overflow: hidden;
}

.tep-progress-fill {
    height: 100%;
    border-radius: 10px;
    background: linear-gradient(90deg, #861542, #be185d);
    transition: width 1s ease;
}

.tep-col-actions {
    flex: 2.5;
    padding-left: 10px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    justify-content: center;
}

.tep-mini-stats-grid {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
    padding: 10px 15px;
    border-radius: 8px;
    gap: 10px;
}

.tep-stat-item {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.tep-stat-val {
    display: block;
    font-weight: 800;
    font-size: 1.2rem;
    line-height: 1;
    color: #1e293b;
    margin-bottom: 2px;
}

.tep-stat-val.alert {
    color: #ef4444;
}

.tep-stat-lbl {
    font-size: 0.7rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
}

.tep-action-buttons {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 15px;
}

.tep-btn-details {
    background: white;
    border: 1px solid #861542;
    color: #861542;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    white-space: nowrap;
}

.tep-btn-details:hover {
    background: #861542;
    color: white;
}

.tep-btn-details:hover .tep-icon-arrow {
    transform: translateX(3px);
}

.tep-check-finish {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 600;
}

.tep-check-finish input {
    accent-color: #861542;
    width: 16px;
    height: 16px;
}

.tep-check-finish:hover {
    color: #861542;
}

.tep-loading-state,
.tep-empty-state {
    text-align: center;
    padding: 60px;
    color: #64748b;
}

/* RESPONSIVE */
@media (max-width: 960px) {
    .tep-project-card-horizontal {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
        padding: 20px;
    }

    .tep-col-info {
        padding: 0 0 15px 10px;
        border-bottom: 1px solid #f1f5f9;
    }

    .tep-project-title {
        white-space: normal;
        -webkit-line-clamp: unset;
    }

    .tep-col-progress {
        padding: 0;
        border: none;
    }

    .tep-col-actions {
        padding: 0;
        gap: 20px;
    }

    .tep-mini-stats-grid {
        background: transparent;
        justify-content: space-between;
        padding: 0;
        display: flex; 
        flex-direction: row;
    }

    .tep-stat-item {
        flex-direction: column;
    }

    .tep-action-buttons {
        justify-content: space-between;
        width: 100%;
    }

    .tep-btn-details {
        width: 100%;
        justify-content: center;
    }
}

.tep-project-card-horizontal {
    max-width: 900px;
    width: 100%;
    margin: 0 auto 30px;
    padding: 25px 30px;
    border-radius: 12px;
    background: white;
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: relative;
    z-index: 3;
    border: 1px solid #ebeff5;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.1), 0 4px 12px rgba(0,0,0,0.1);
}

/* Fila 1 */
.tep-project-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tep-project-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 8px;
    line-height: 1.3;
    text-transform: uppercase;
}

/* Fila 2 */
.tep-project-body {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
}

/* PROGRESO */
.tep-progress-section {
    flex: 2;
    min-width: 180px;
}

/* TOTALES */
.tep-stats-section {
    flex: 1;
    display: flex;
    justify-content: center;
    gap: 40px;
    text-align: center;
}

/* BOTÓN */
.tep-actions-section {
    flex-shrink: 0;
}

/* RESPONSIVE */
@media (max-width: 820px) {
    .tep-project-body {
        flex-direction: column;
        align-items: flex-start;
        gap: 18px;
    }

    .tep-stats-section {
        width: 100%;
        justify-content: space-between;
    }

    .tep-actions-section {
        width: 100%;
    }
}

