/* =========================================================
   WORKPLACE TRANSFORMATION HUB STYLES
   Objetivo:
   - Layout limpio, consistente y alineado con CheckInnova
   - Alta legibilidad tanto en escritorio como en dispositivos móviles
   - Fichas ejecutivas, métricas KPI, badges y semáforos
   ========================================================= */

.wp-theme-transformation {
    --tf-primary: #1e3a8a;
    --tf-primary-hover: #1d4ed8;
    --tf-primary-light: #eff6ff;
    --tf-primary-soft: rgba(30, 58, 138, 0.08);
    --tf-primary-border: rgba(30, 58, 138, 0.18);
    --tf-gradient: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
    --tf-accent: #3b82f6;
    --tf-success: #10b981;
    --tf-success-soft: rgba(16, 185, 129, 0.08);
    --tf-warning: #f59e0b;
    --tf-warning-soft: rgba(245, 158, 11, 0.08);
    --tf-danger: #ef4444;
    --tf-danger-soft: rgba(239, 68, 68, 0.08);
    --tf-border: #e2e8f0;
    --tf-border-strong: #cbd5e1;
    --tf-text-main: #0f172a;
    --tf-text-soft: #475569;
    --tf-text-muted: #64748b;
    --tf-shadow-sm: 0 1px 3px rgba(0,0,0,0.03), 0 2px 6px rgba(15, 23, 42, 0.04);
    --tf-shadow-md: 0 4px 16px rgba(15, 23, 42, 0.06), 0 8px 24px rgba(15, 23, 42, 0.05);
    --tf-radius-sm: 8px;
    --tf-radius-md: 14px;
    --tf-radius-lg: 20px;
    --tf-transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* =========================================================
   CONTENEDOR DE CONTENIDO PRINCIPAL
   ========================================================= */
.tf-content-container {
    max-width: 1680px;
    margin: 0 auto;
    width: 100%;
}

.tf-header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--tf-border);
}

.tf-header-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--tf-primary);
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* =========================================================
   KPI & METRIC CARDS
   ========================================================= */
.tf-metric-card {
    background: #ffffff;
    border-radius: var(--tf-radius-md);
    border: 1px solid var(--tf-border);
    padding: 1.25rem;
    box-shadow: var(--tf-shadow-sm);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform var(--tf-transition), box-shadow var(--tf-transition), border-color var(--tf-transition);
}

.tf-metric-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--tf-shadow-md);
    border-color: var(--tf-primary-border);
}

.tf-metric-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--tf-text-main);
    line-height: 1.1;
    margin-bottom: 0.25rem;
}

.tf-metric-label {
    font-size: 0.78rem;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--tf-text-muted);
    letter-spacing: 0.5px;
}

.tf-metric-hint {
    font-size: 0.75rem;
    color: var(--tf-text-muted);
    margin-top: 0.5rem;
}

/* =========================================================
   CARDS GENERALES & ELEVACION
   ========================================================= */
.wp-theme-transformation .card {
    border-radius: var(--tf-radius-md) !important;
    border: 1px solid var(--tf-border) !important;
    box-shadow: var(--tf-shadow-sm) !important;
}

.wp-theme-transformation .card.shadow-sm {
    box-shadow: var(--tf-shadow-sm) !important;
}

.wp-theme-transformation .card-hover:hover {
    transform: translateY(-3px) !important;
    box-shadow: var(--tf-shadow-md) !important;
    border-color: var(--tf-primary-border) !important;
}

/* =========================================================
   TIMELINE / LÍNEA DE EVOLUCIÓN
   ========================================================= */
.tf-timeline {
    position: relative;
    padding-left: 2rem;
    border-left: 2px solid var(--tf-border);
    margin-left: 1rem;
}

.tf-timeline-item {
    position: relative;
    margin-bottom: 1.75rem;
}

.tf-timeline-item:last-child {
    margin-bottom: 0;
}

.tf-timeline-point {
    position: absolute;
    left: -2.6rem;
    top: 0.25rem;
    width: 1.2rem;
    height: 1.2rem;
    border-radius: 50%;
    background: #ffffff;
    border: 3px solid var(--tf-accent);
}

.tf-timeline-point.success {
    border-color: var(--tf-success);
}

.tf-timeline-point.warning {
    border-color: var(--tf-warning);
}

.tf-timeline-point.danger {
    border-color: var(--tf-danger);
}

.tf-timeline-date {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--tf-text-muted);
    text-transform: uppercase;
}

.tf-timeline-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--tf-text-main);
    margin-bottom: 0.25rem;
}

.tf-timeline-desc {
    font-size: 0.85rem;
    color: var(--tf-text-muted);
}

/* =========================================================
   STATUS BADGES & PILLS
   ========================================================= */
.tf-badge-pill {
    padding: 0.35rem 0.75rem;
    font-size: 0.76rem;
    font-weight: 600;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    letter-spacing: 0.01em;
}

.tf-badge-success {
    background-color: #d1fae5;
    color: #065f46;
}

.tf-badge-primary {
    background-color: #dbeafe;
    color: #1e40af;
}

.tf-badge-warning {
    background-color: #fef3c7;
    color: #92400e;
}

.tf-badge-danger {
    background-color: #fee2e2;
    color: #991b1b;
}

.tf-badge-secondary {
    background-color: #f1f5f9;
    color: #475569;
}

.tf-badge-info {
    background-color: #cff4fc;
    color: #055160;
}

/* =========================================================
   PROGRESS BARS
   ========================================================= */
.tf-progress-container {
    background-color: #e2e8f0;
    border-radius: 6px;
    height: 8px;
    overflow: hidden;
    width: 100%;
}

.tf-progress-bar {
    height: 100%;
    border-radius: 6px;
    transition: width 0.3s ease;
}

/* =========================================================
   TABLAS RESPONSIVAS
   ========================================================= */
.wp-theme-transformation .table thead th {
    font-size: 0.78rem;
    letter-spacing: 0.02em;
    color: var(--tf-text-soft);
    font-weight: 700;
    border-bottom: 1px solid var(--tf-border);
    background-color: #f8fafc;
    padding: 0.85rem 1rem;
}

.wp-theme-transformation .table tbody td {
    vertical-align: middle;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid rgba(226, 232, 240, 0.7);
    font-size: 0.86rem;
}

/* =========================================================
   PESTAÑAS / TABS NAV
   ========================================================= */
.wp-theme-transformation .nav-tabs .nav-link {
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--tf-text-muted);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.75rem 1.25rem;
    transition: all var(--tf-transition);
}

.wp-theme-transformation .nav-tabs .nav-link:hover {
    color: var(--tf-primary);
    border-bottom-color: var(--tf-primary-border);
}

.wp-theme-transformation .nav-tabs .nav-link.active {
    color: var(--tf-primary) !important;
    border-bottom-color: var(--tf-primary) !important;
    background: transparent;
}

/* =========================================================
   RESPONSIVE EN MÓVILES
   ========================================================= */
@media (max-width: 767.98px) {
    .tf-content-container {
        padding: 0.25rem;
    }

    .tf-header-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .tf-metric-card {
        padding: 1rem;
    }

    .tf-metric-value {
        font-size: 1.4rem;
    }

    .tf-metric-label {
        font-size: 0.72rem;
    }

    .tf-timeline {
        padding-left: 1.5rem;
        margin-left: 0.5rem;
    }

    .tf-timeline-point {
        left: -2.1rem;
        width: 1rem;
        height: 1rem;
    }
}
